Showing posts with label Sharepoint Webservices : Retrieving WebSites. Show all posts
Showing posts with label Sharepoint Webservices : Retrieving WebSites. Show all posts

Wednesday, November 16, 2011

Sharepoint Webservices : Retrieving WebSites


Retrieving WebSites

private static void readSite(string url, string login, string password)
{
    Webs service = new Webs();
    service.PreAuthenticate = true;
    service.Credentials = new System.Net.NetworkCredential(login, password);
    service.Url = url + @"/_vti_bin/webs.asmx";

    XmlNode sites = null;

    try
    {
        sites = service.GetWebCollection();
    }
    catch
    {
        return;
    }

    foreach (System.Xml.XmlNode site in sites.ChildNodes)
    {
        Console.WriteLine(site.Attributes["Url"].Value);

        GetLists(site.Attributes["Url"].Value, login, password);
        GetSites(site.Attributes["Url"].Value, login, password);
    }
}


Featured Posts

Kali Linux Remote Desktop: Access GNOME from Windows Using Native RDP

  Kali Linux + GNOME 50 + GNOME Remote Desktop + Windows Remote Desktop (MSTSC) Getting a full GNOME desktop remotely on Kali Linux can be ...