2010-02-11 67 views
0

我正在使用Web服务访问SharePoint列表,网站和文档。 赞:List.asmx,Site.asmx e.t.c.我们是否需要从Sharepoint断开连接?如果是如何?

我的问题是:

我们需要从SharePoint断开使用上述服务时? 如果是的话怎么样?

例子:

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? 

} 
+0

我不明白你想做什么。你能更详细地描述你需要什么吗? – jaloplo 2010-02-11 07:42:09

回答

3

Web服务在默认情况下断开连接,您可以通过发送和接收消息进行通信,所以没有必要断开。

相关问题