create a sample webservice application in vs2010 and giving ref to microsoft.sharepoint.dll.run->Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=22.214.171.124, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependen
Friday, April 27, 2012 7:52 AM
create a sample webservice application in vs2010(writing sp related code) and add reference to microsoft.sharepoint.dll.
add a new webform.aspx and add an object to connect to the webservice and call that webmethod.debug the program
it gives the following error when debug the program.
i am using vs2010.in my server sp2010 was installed.(Using Windows Vista)
Could not load file or assembly 'Microsoft.Sharepoint.Sandbox, Version=126.96.36.199, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependen
Friday, April 27, 2012 10:18 AM
Is th web service hosted on the sharepoint server ? If its not it wont work?
Is it a 32 bit code ? or 64 bit code ?
Ramez Al kara Software Consultant MCITP SHAREPOINT
Wednesday, May 02, 2012 8:41 AMModerator
Please check if integrated web server of Visual Studio 2010 does not run in an x64 environment. It runs only for 32 bit application.
If yes, we need to make changes in the current project properties as below:
- configure your web application in Visual Studio 2010 to the target .NET Framework 3.5 and to run as x64 or “Any CPU”
- create a web application in IIS7 and configure the application pool to run for the .NET Framework Version v2.0 and x64. To ensure that the application runs in X64 , just set “Enable 32-Bit Applications” to false.
- configure your web application in Visual Studio 2010 in the property page to “Use Custom Web Server” and specify there the url of your web application in IIS7
For more information, you can refer to:http://www.lamber.info/post/2010/10/16/File-not-found-exception-when-accessing-SPSite.aspx
TechNet Community Support