The following code throws a System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Attempted to perform an unauthorized operation.
SiteDataReference.SiteData siteData = new SiteDataReference.SiteData();
siteData.Credentials = new NetworkCredential("username", "password");
siteData.Url = "http://server/_vti_bin/sitedata.asmx";
string lastChangeID = String.Empty;
string result = siteData.GetContent(SiteDataReference.ObjectType.SiteCollection, "", "", "", false, false, ref lastChangeID);
What am I doing wrong here? I have used other web services to get files and list from the same sp server.