Solving SharePoint object model exception “Web application at URL could not be found”

You are bound to hit this exception once in your life time while working with SharePoint object model; specifically while creating object of SharePoint Site. The exception would be something like:

Unhandled Exception: System.IO.FileNotFoundException: The Web application at http://myserver 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 at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri,

Boolean con
textSite, SPUserToken userToken)
at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
at Sharepoint.Tools.SPResetAuthor.Main(String[] args) in C:UsersProgram.cs:line 27

The problem is due to the face that you may have your application set to build as 32 bit in your visual studio project settings.

So the solution: set the “”platform target”” property to “”x64″”, and build again.

Prakash Software Solutions PVT LTD. Offer wide range of services to their clients all over the globe. We successfully delivered projects i.e. software development, cloud computing solutions, SharePoint development solutions, mobile app development and Microsoft technology solution to our Sweden, Denmark, Netherlands, France, Norway, Germany, Spain, Italy, Switzerland, Belgium, Luxembourg, Ireland, United Kingdom, United States, Canada, Brazil, Peru, UAE, Dubai, Saudi Arabia, Kuwait, Qatar, Bahrain, Singapore, New Zealand and Australia Clients.

Related Posts


  1. Anonymous
    January 14, 2013 19:29 Reply

    Really good blog. That’s exactly what I was looking for.

  2. Andres
    January 20, 2013 12:02 Reply

    Hi there! I simply would like to give an enormous thumbs up for the good info that you have here in this post. I could be coming back on your blog for more soon.

Leave a reply