Solved

C# program that uploads files to sharepoint (409) Error  when using the  Microsoft.SharePoint.Client.File.SaveBinaryDirect

Posted on 2014-11-11
1
707 Views
Last Modified: 2014-11-11
I keep getting 409 sharepoint error.  I dunno why when uploading files. code is below

 using (ClientContext clientContext = new ClientContext(SharePointRootURL())
                    {
                        clientContext.Credentials = GetSharePointCredentials();

                        var thisFileStream = System.IO.File.OpenRead(FilePath);

                        string FileName = System.IO.Path.GetFileName(FilePath);
                       
                        Microsoft.SharePoint.Client.File.SaveBinaryDirect(clientContext, String.Format(SharePointMemberPartnerReportLocation(), MemberPartnerFirmURL) + FileName, thisFileStream, true);
                       
                        thisFileStream.Close();
                    }
0
Comment
Question by:cbrune
1 Comment
 
LVL 31

Accepted Solution

by:
Jamie McAllister MVP earned 500 total points
ID: 40436043
Is your code deffo putting a forward slash character between the MemberPartnerFirmURL and the Filename?

Since a 409 is about a rules conflict think about what rules may be being contravened. Are there existing files being overwritten?

http://www.checkupdown.com/status/E409.html
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now