How to open sharepoint site in InfoPath by coding ?
I have written this code,
SPSite site = new SPSite("http:/MyServer/sites/MySite/");
SPWeb web = site.OpenWeb();
but it throws this error. "The Web application at http:/MyServer/sites/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."
So How should I open my site to perform my operation ?
