I have a SharePoint site with a few subsites.
I also have a C# program which connect to one of these subsites and import files to SharePoint. A few days ago, I installed this program on a Windows Server 2008 R2 SP1 Standard server (since it was mostly for test purposes, I just copied my project's bin/Release to the server).
It worked flawlessly for a day, then, for no apparent reason, it stopped working. There has been no known changes on the server.
I did some research, and conclude the issue could be linked to the DLL Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime, since they were not initially distributed with my program.
The program still runs fine on another server and on my machine, and I can access the SharePoint sites from the server using a internet browser, and of course from any other machine.
What I did try:
- Including the DLL in my program's folder
- Deleting these DLLs from the GAC
- Reinstalling in the GAC
- Tried older versions of my program
- Checked for outdated password
What I haven't/couldn't try:
- Edit web.config: I have no idea how to access it, since I don't have any known access to the site. Then again, the program works fine on other machines, so I guess the issue isn't website-sided.
- Reinstall .NET framework: If I can avoid doing this, I'm OK, but if there's no choice left...
The error remains the exact same:
à Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
à Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
à MyNamespace.MyClass.getLibraries()
à MyNamespace.Forms.MainWindow.<>c__DisplayClass9.<doConnection>b__4()
Microsoft.SharePoint.Client/Void EnsureFormDigest()/Cannot contact site at the specified URL
https://mydomain.sharepoint.com
Any idea on this issue? I will edit if more information is needed.