I am trying to create a simple web page with three text boxes. I then pass the three values to a client for a SharePoint service application. However, when it calls on the SharePoint service application, I get an error saying it can't find the site collection. This is because platform target under Project > Properties is set to Any CPU.

Normally, when developing in SharePoint, if I get this error, I set the platform target CPU to x64 and everything works fine, but when I do that in my asp.net webpage, I get a "Could not load file or assembly 'TLAPIWebClient, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format." error when I compile the webpage, as well as a few "Assembly generation -- Referenced assembly 'System.Web.dll' targets a different processor" warnings in Visual Studio.

Does anyone know how to create a 64 bit asp.net webpage that can call on a SharePoint 2010 service application?

  • 2
    "Any CPU" means any CPU - 64 or 32 bit.So this setting cannot cause problem with SharePoint 2010. The problem may be with the code itself.Which SharePoint service you use? Nov 25, 2011 at 3:06

1 Answer 1


The recommended way to work with SharePoint from remote applications is to use the Client Object Model. This solves the 32/64 bit issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.