continueing with my current project of trying to automatically create Sharepoint folders and copy files into sharepoint.
I have now done this with a webservice and a web application. I was getting this error when I published the web application to the live server, the code was working on my local dev environment.
This time I was coding the web application and when it got to the point of trying to connect to sharepoint it was throwing this error
Could not load file or assembly ‘Microsoft.SharePoint.Client, Version=22.214.171.124, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. The system cannot find the file specified.
The key to this error (in my opinion) was the fact it could not find the file. This basically seemed to say it could not find Microsoft.SharePoint.Client.dll
This seemed a bit odd because I had added the dll as a reference but looking in the bin directory of the deployed web application.
This other time I have had an error similar to this is when I have tried to run the CRM plugin registration tool and the folder hasn’t got the microsoft.crm.sdk.dll and maybe a couple of other dl’s.
So once I copied the sharepoint dll’s into the bin directory of my web application it was working