Server was unable to process request. ---> Attempted to perform an unauthorized operation
Error during web service call, calling Search.asmx from console applicatin
Server was unable to process request. ---> Attempted to perform an unauthorized operation
Here is nice article about this error, but my issue was I forgot to assign url to service instance. When I added it, code ran without problems
QueryService service = new QueryService();
service.Url = "https://mysitecollection/_vti_bin/search.asmx";
service.Credentials = CredentialCache.DefaultCredentials;
service.UseDefaultCredentials = true;