Question

I'm building a web application that is based on Microsoft Search Server 2010 and uses its web services.

I need to be able to search as an anonymous user. So I have enabled anonymous access for my SP search center and am able to search there.

But when I call QueryService.Query method I get the error message:

Server was unable to process request. ---> Attempted to perform an unauthorized operation

To call the service I use this code:

QueryService service = new QueryService
{
   Credentials = CredentialsCache.DefaultCredentials
};

DataSet dataSet = service.QueryEx(query);

Where I can enable anonymous access for the web service?

Was it helpful?

Solution

Do you have multiple zones on your web application? If so, try calling the web service on a zone that does not have Anonymous access enabled. I came across this post a while back that shed some light onto it.

http://chrisdomino.com/Blog/Post/401-Reasons-Why-SharePoint-Web-Services-Don-t-Work-Anonymously?Length=4

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top