开发者

SharePoint 2010 Unauthorized exception

I am trying to get search categories from the code (Microsoft.Office.Server.Sear开发者_如何学编程ch.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


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


You should go to

CA > Manage Service Application > Click on Search Service Application line to get it selected.

In a ribbon click Administrators and add the user which is going to be used to create search categories (if you use SPSecurity.RunWithElevatedPrivileges then it should be your Application Pool Account)!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜