Hello,
When i tries to access a current site name of sharepoint into my infopath form it give me error like:
The Web application at http://MySharepoint 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.
I have tried different option like:
1) string strSitename=SpContext .Current.Site.Url;
2) SpSite spSitename = new SpSite("http://MySharepoint") ;
3) SpSite spSitename = new SpSite("http://191.1.1.1") ;
4) SpSite spSitename = new SpSite("http://intranet") ; (My AAM name).
But still i didn't got Current site name into infopath form. I am stuck here and already it has taken my one day. Please help on this.
Thank you.