SharePoint 2010 未经授权的异常
我试图从代码中获取搜索类别(Microsoft.Office.Server.Search.Administration.SearchServiceApplication.Schema.AllCategories)。但是它会引发我未经授权的异常(ThrowIfNotSearchAdmin)错误。
有人面对并解决过这个问题吗?在 SharePoint 2010 中哪里配置搜索管理员?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过调用 SPSecurity.RunWithElevatedPrivileges( )?
Have you tried to call the code within SPSecurity.RunWithElevatedPrivileges()?
你应该去
在功能区中单击管理员并添加将用于创建搜索类别的用户(如果您使用SPSecurity.RunWithElevatedPrivileges,那么它应该是您的应用程序池帐户)!
You should go to
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)!