SharePoint Search Web Service Error: Attempted to perform an unauthorized operation

/* Posted January 9th, 2009 at 8:29am */
/* Filed under C#, Microsoft, SharePoint */

/* */

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


queryService.Credentials = new System.Net.NetworkCredential(“username”,“password”,“domain”);

or you may want to try different passing

queryService.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

or

NetworkCredential networkCredential = CredentialCache.DefaultCredentials.GetCredential(new Uri(queryService.Url), “NTLM”);

or

queryService.Credentials = networkCredential;

queryService.Credentials = System.Net.CredentialCache.DefaultCredentials;
queryService.PreAuthenticate = true;

What we found the error to be was:
1. Check to make sure account you are logging in with has authority to do so.

2. Make sure that you are able to connect to the sites search service (IE, make sure its working properly) Try to connect to other search services to debug issue – Most times default credentials so not work and you will need to login.

You can try to use the Search Service tool here:
http://www.mosssearch.com/searchwebservice.html
But that only allows you to login with default credentials and may fail some of the time.

  • Twitter
  • Digg
  • del.icio.us
  • Propeller
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Mixx
  • Yahoo! Buzz
  • NewsVine
  • Facebook
  • Google Bookmarks

Related Posts


Related Stories