Miracleshsq

I wanna connect to the remote WSS site in my code of Web Part by means of code as below:

SPSite site = new SPSite(http://eis-wss);

SPWeb web = site.OpenWeb();

But it notices me that some unkown error is encountered.

Seems the problem is it can't get access to the target wss site

Please give me some tips about this issue



Re: SharePoint - Development and Programming a questiong about WSS developing

Miracleshsq

sorry, let me correct my pasted code a little bit. It's like this:

SPSite site = new SPSite("http://eis-wss");

SPWeb wssWeb = site.OpenWeb();

wssWeb.AllowUnsafeUpdates = true;





Re: SharePoint - Development and Programming a questiong about WSS developing

DKeeling

When you say remote you mean you have a webpart on server1, and you want to user the objectmodel to connect to server2 Both are running sharepoint I take it What is the error message, can you throw a try-catch around it to get better details