Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Cannot connect to another web application in my webpart

$
0
0

I have a web part in my webapp1.com which retrieves the list of items by entering the url in a textbox and when a button is clicked, it retrieves the list of items

heres the sample code

using(SPSite site = new SPSite(txtUrl.text))
{
  using(SPWeb web = site.OpenWeb())
  {
  }
}

but when I enter another web application(webapp2) in the text box, there is an error in my SPSite that it cannot find/access the webapp2.com

----------------------- Sharepoint Newbie


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>