开发者

Do we need to disconnect from sharepoint? If Yes How?

开发者_JAVA百科

I am using web services to access SharePoint list,sites and documents. Like: List.asmx,Site.asmx e.t.c.

My question is that:

Do we need to disconnect from SharePoint when using above services? And if yes then How?

Example:

GetSiteCollection(String login, String password, String url)
{

Webs ws = new Webs();                
try
{
 ws.Credentials     = new NetworkCredential(login, password);                    
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
ws.Url              = url + @"/_vti_bin/webs.asmx";
ws.PreAuthenticate  = true;
XmlNode websiteNode = ws.GetWebCollection();
XmlNodeList nodes   = websiteNode.SelectNodes("*"); 

// getting list set of sites

//Now here after this is there any way to disconnect from server? 

}  


Webservices are disconnected by default, you communicate by sending and receiving messages, so there's no need to disconnect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜