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?


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.


| improve this answer | |
  • But then It will ask credentials? – Sly May 13 '11 at 6:18
  • Yes, you will need to have credentials using this method. We have had issues on our Anonymous site with other applications calling the web services. What we did is extend the zone and put Anonymous on an extended zone. Then we called the web service on a 'non anonymous' zone using credentials that had access to the content. – Jason Jones May 13 '11 at 15:12
  • Is there any way to do this with Anonymous on? I'm actually trying the same thing using the New-WebServiceProxy in PowerShell. Scripting Guy notes it should work, my real life experience says otherwise. But all our sites are set with Anonymouns and Windows Integration on. Just wondering if this is still a dead end – MichaelF Mar 8 '12 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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