Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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=1.0.0.0, 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?

share|improve this question
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? –  Amit Kumawat Nov 25 '11 at 3:06
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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