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=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependen

תשובה 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=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependen

  • יום שישי 27 אפריל 2012 07:52
     
     

    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=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependen


    • נערך על-ידי sudhir muvva יום שישי 27 אפריל 2012 08:02
    • הועבר על-ידי Xue-Mei Chang-MSFTModerator יום רביעי 02 מאי 2012 08:20 programming issue (From:SharePoint 2010 - General Questions and Answers)
    •  

כל התגובות

  • יום שישי 27 אפריל 2012 10:18
     
     

    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

  • יום רביעי 02 מאי 2012 08:41
    מנחה דיון
     
     תשובה

    Hi,

    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:

    1. configure your web application in Visual Studio 2010 to the target .NET Framework 3.5 and to run as x64 or “Any CPU”
    2. 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.
    3. 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


    Xue-mei Chang

    TechNet Community Support