QueryService.Query anonymous access
-
16-10-2019 - |
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?
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange