Solving SharePoint object model exception “Web application at URL could not be found”
Aug 18, 2012

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.

2 COMMENTS

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

    - Anonymous
    January 14, 2013 19:29
    Reply
  2. 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.

    - Andres
    January 20, 2013 12:02
    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Related Posts

SharePoint Migration

SharePoint is considered a Powerful business Tool with great features and interface comes…

Jul 15, 2015

SharePoint site first load is very slow

The sharepoint site is very slow when we access it first time. After…

May 30, 2011

“Cannot complete this action” error while saving site as template

Today while trying to save a site as template (through “Site Settings” >…

May 18, 2012
Top

Copyright © Prakash Software Solutions Pvt. Ltd. All Rights Reserved.