Do we need to disconnect from sharepoint? If Yes How? ( using Web Services : C#)
Posted
by Pari
on Stack Overflow
See other posts from Stack Overflow
or by Pari
Published on 2010-02-11T07:39:59Z
Indexed on
2010/03/22
6:21 UTC
Read the original article
Hit count: 434
c#
|sharepoint2007
Hi,
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?
}
© Stack Overflow or respective owner