FileNotFound exception using Sharepoint 2010 with SPSite Designer

I am trying to create an SPSite instance on a farm server in a console application, and I give the whole site in the parameter ( http: // sp2010 / ). I also made sure that the account MyApp.exe is running on is the Site Collection Administrator.

However, I cannot make the SPSite instance what I'm trying to do. I always return a "FileNotFoundException".

Anyone got an idea?

Stacktrace:

System.IO.FileNotFoundException: web application http: // localhost / sandbox not found. Make sure you type the URL correctly. If the URL must serve existing content, the system administrator may need to add a new URL for the intended application. in Microsoft.SharePoint.SPSite..ctor (farm SPFarm, Uri requestUri, Boolean contextSite, SPUserToken userToken) in Microsoft.SharePoint.SPSite..ctor (String requestUrl) in Conchango.xyzzy.GetExistingDocument (String minId, String maxId, String titleFilter ) in C: \ Documents and Settings \ Paul \ My Documents \ Visual Studio 2005 \ Projects \ xyzzy \ BDC_DocReview \ BDC_DocReview \ DocReviewFacade.asmx.cs: line 69

When I run this application using the application pool id account, it works fine. However, when I launch this console application using another user who is the Site Collection Administrator, Admin Admin, has dbowner privileges in the content database for the Sharepoint web application. This does not work correctly and gives me this Filenot Founf Exception.

The Console application uses the .NET Framework 3.5 and x64 as the CPU platform. Again this works if I use an application pool id account but not with any other account

+5
source share
6 answers

, , SharePoint,

+4

, " :" "" " ".

+4

.NET, , SharePoint 2010 Server, .NET 4.5 , , .NET 3.5, .

+2

MSTest, , Test Runner . . SO- MSTest .

+1

I had to make a test application of Windows Forms.NET 3.5 instead of .NET 4.5.

0
source

SP 2010 only works in x64 mode. Therefore, change the target platform of the platform to x64. If your service is already running in IIS, make sure your application pool has the Enable 32-bit applications property set to false.

0
source

All Articles