Hi,
I am trying to create an instance of SPSite in Form_Loading event of the InfoPath 2007 template. When I use:
SPSite site = new SPSite("http://myserver/mysite")
I get error:
System.IO.FileNotFoundException: The Web application at http://myserver/mysite 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 contextSite, SPUserToken userToken) at....
I am using Visual Studio 2008 on Windows 2008 R2 (64-Bit)
Any suggestion?
Muhammad Zubair Uddin