views:

44

answers:

1

Hi,

I am trying to get search categories from the code (Microsoft.Office.Server.Search.Administration.SearchServiceApplication.Schema.AllCategories). However it throws me UnAuthorized exception( ThrowIfNotSearchAdmin) error.

Has anybody faced and resolved this? Where to configure search administrator in SharePoint 2010?

Thanks

+1  A: 

Have you tried to call the code within SPSecurity.RunWithElevatedPrivileges()?

Flo