Saturday, December 04, 2010

Running a sharepoint windows app in x64 Vs x86

If you execute the following line of code on a Windows app and get the error on red specified :
=================================================================

SPSite site = new SPSite("http://yoursite.com"); 
SPWeb web = site.OpenWeb();
=================================================================
Error : The Web application at http://yoursite.com could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
=================================================================

Issue is : you are not targetting the X64 - targeting x64 or AnyCpu & .NET 3.5 Framework in your Windows Application will resolve this issue.
=================================================================

0 comments: