0

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.

1 Answer 1

1

check to make sure that annonymous users are not allowed (disabled) in iis for the given web application!

Go to IIS Manager, Website, right click and select Properties, goto Directory Security and Uncheck Enable Anonymous Access

1
  • Thanks ali for such a quick response. Right now I don't have access to the sharepoint server. I will let you know if this resolves the issue as soon as I get an access. Commented Apr 9, 2013 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.