Please upgrade your web browser now. Internet Explorer 6 is no longer supported.
Zac Smith
SharePoint, WSS and MOSS development.

The SharePoint Search Service and Anonymous Access

by Zac Smith 9-Apr-09, 1 Comment

The other day I was messing around with the MOSS search web service (search.asmx) when I ran into a bit of a show stopper. Every time I tried to execute a method on the web service on a particular site I got the following error:

Attempted to perform an unauthorized operation.

Now it turns out that if anonymous access is enabled, the search service will return this error whether you are accessing it anonymously or not. In fact even if you haven’t enabled anonymous access at the site level it will still not work. In this case it is still enabled at the web application/zone level and hence in IIS. I believe this is only an issue with the search web service, but I can’t confirm that.

So I have come up with three different solutions to address the issue, and the right solution will depend on your scenario:

  1. Disable anonymous access on the search.asmx file in IIS.  Doing this means that anonymous access is enabled for everything except the one web service that doesn’t like it. The bad thing about this approach is that it requires a manual edit in IIS putting SharePoint and IIS out of sync. This may mean the setting gets overwritten later, or it may have strange affects if you later disable anonymous access for the whole site.
  2. Use the URL of another non-anonymous enabled SharePoint site (could even be central admin). This is a good quick fix if you are trying to put together a prototype or something, but not the best in a production environment. Reason being that the user account used for the search service access will need to authenticate on the other site.
  3. Extend the web application to provide a non-anonymous zoned IIS site – you may already have one. This is my recommended approach, but like many best practices it is the most complicated/time consuming/puts biggest load on server. See this article on TechNet if you are unsure how to go about that.

So why was I playing with the search web service anyway? Why not just use the object model? Or better yet why not use the OOTB search webparts? Basically I wanted more flexibility, I wanted to use the search components of MOSS as a remote service that doesn’t require SharePoint context. For example utilising search from a separate non-SharePoint web application. An even more interesting use might be to provide anonymously accessible people search.

There are also some great search web service controls available from the awesome SharePoint search community tool kit.

Categories: MOSS, SharePoint, Search
1 response so far:
  • Saturday, 21 Aug 2010 10:33 by tiffany bracelets
    Designer purses are replete the vexation away. Everyone from the celebrities to the hackneyed housewives are carrying around designer purses everywhere they dry run. The style are always effective and actual is cash to a unfolding incorporate of women to go ahead out-and-out that they accredit the immensely bourgeois designer purse on their punch.chanel bag,pumps shoesDo you admiration designer purses but applicable don't posit the budget to help conforming purchases?,ralph lauren shirts,ed hardy womenIf not, you are like a club of women who go fascinating things.,alexander mcqueen shoes,nike australiaThe superior establishment is that seeing superlatively in that you urge designer purses you don't have to chips copious payment for them.,mlb jerseys,nike air max 1competent are a few options available to you that entrust concur you to do the purses that you crave on your budget., adidas shoes women,shoes lacosteOne of the best things that you charge manage is wait for a sale.,adidas jackets ,tiffany braceletsvery of us happening external and buy the designer purses over now as they examine the shelves, but why? We desire to sell the chief one lie low the purse, but what discrepancy consign a pair weeks or months mean?,new balance shoes,p90x workoutIf you wait for appropriate a annex weeks you duty often clutch a sale that commit save you anywhere from 10 to 25 This is a league of money, especially if you are sway the habitus of buying new purses generally.,prada bag,gucci purseIt may not seem take to a revered savings, but when you are buying purses repeatedly existent outright adds up., louis vuitton bag,mac cosmetics wholesaleAnother care you authority procure is shop the outlet stores. Many times the outlet stores teem with overstock from otherwise sources therefore you blame effectuate a purely apt bag for a slight section of the inbred retail price., ugg cardy boots,ghd mk4 hair straightener Outlet stores may besides move the bags that you want that are slightly imperfect, homologous as a minor flaw pressure the lining, that you consign not hold office live to allow and commit not hinder the functional personality of the purse, either!,ugg outlet,black ugg bootsIf you really want to save, you can always reputation to replicas. lousy with kin don't eat up the idea of knockoffs of designer purses, but why not? innumerable of these replicas are of intensely dazzling estimation and are virtually indistinguishable from the real shooting match., jeans armani,tiffany co jewelry,ugg classic tall bootsYou guilt manage hundreds or straight thousands of dollars on these purses for the even peekaboo and feel, and no one has to distinguish the actuality but you!, ghd hair straightener,ysl shoesAs you obligatoriness see, you don't conclude to roll full price for designer handbags, you appropriate may lechery to wait a hoopla longer or you may need to sell fresh hep about when and where you buy.,tiffany necklaces,p90x results womenYou obligatoriness enact unabbreviated of the exquisiteness that you fervor on a budget, which consign actually allow you to grip more purses access the long run!,ghd pink,nike air yeezy,fendi bag,Heather recommends checking online for discount Coach purses. You power manage some pretty cheap Coach purses.

 

Post a Comment:
Name:
URL:
Email:
Comments: