Anonymous Access and Sharepoint Web Services

Posted by Stacy Vicknair on Geeks with Blogs See other posts from Geeks with Blogs or by Stacy Vicknair
Published on Wed, 22 Jun 2011 19:52:41 GMT Indexed on 2011/06/23 0:23 UTC
Read the original article Hit count: 493

Filed under:

A month or so ago I was working on a feature for a project that required a level of anonymity on the Sharepoint site in order to function. At the same time I was also working on another feature that required access to the Sharepoint search.asmx web service. I found out, the hard way, that the Sharepoint Web Services do not operate in an expected way while the IIS site is under anonymous access. Even though these web services expect requests with certain permissions (in theory) they never attempt to request those credentials when the web service is contacted. As a result the services return a 401 Unauthorized response.

The fix for my situation was to restrict anonymous access to the area that needed it (in this case the control in question had support for being used in an ASP.NET app that I could throw in a virtual directory). After that I removed anonymous access from IIS for the site itself and the QueryService requests were working once more.

Here’s a related article with a bit more depth about a similar experience:
http://chrisdomino.com/Blog/Post/401-Reasons-Why-SharePoint-Web-Services-Don-t-Work-Anonymously?Length=4

© Geeks with Blogs or respective owner