1

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.

Community
  • 1
  • 1
Kilazur
  • 3,089
  • 1
  • 22
  • 48
  • So, for the record, this problem is now solved. The only issue I have is that I have no idea how. We just tried to use our program one day and it worked, just like that. I'd blame Windows updates, but can't be sure since I kinda tried (un)installing almost every single one. – Kilazur Oct 27 '14 at 13:40

1 Answers1

0

"Cannot contact site at the specified URL https://mydomain.sharepoint.com" <-- the domain here is a generic one which leads me to believe that one of your libraries (dll's) is not being loaded correctly and a Default domain value is being used (like an internal static reference)

I recommend you update the service pack on the R2 server to the latest release you can find and then re-deploy your app to /Release and try again.

as a sanity check, look at the version numbers of the Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime dll files on any server that is working and then try to get the same files over to the r2 server.

FlemGrem
  • 814
  • 4
  • 9
  • I thought it was obvious I've put that as a placeholder domain not to put my company's... My bad. About the DLL versions, yeah, they're fine. – Kilazur Oct 07 '14 at 16:35
  • What about the service pack? – FlemGrem Oct 07 '14 at 20:24
  • Yup, there's only one to this day, it's installed. – Kilazur Oct 08 '14 at 08:04
  • Have you more than one front-end ? You use kerberos ? The time of the client in witch your program is installed are in sync with the sharepoint and Domain Controller Time ? – Max Oct 11 '14 at 09:51
  • @Kilazur your program settings target a x64 CPU ? Have you more than one front-end ? You use kerberos ? The time of the client in witch your program is installed are in sync with the sharepoint and Domain Controller Time ? – Max Oct 14 '14 at 13:58
  • The program targets x86. No idea what a front end is in this context, neither Kerberos. I guess the time is in sync since i can access it from a browser, but that's far from my domain of work. Could I get some insights on how to get these informations? – Kilazur Oct 15 '14 at 10:37