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.