未经授权访问 WSS spsearch.asmx
我正在运行一个连接到 WSS 3.0 搜索 Web 服务 (spsearch.asmx) 的 ASP.NET Web 应用程序。
WSS 站点本身配置为匿名访问:站点搜索适用于 chrome、firefox 等,无需授权。
我还为 spsearch.asmx 设置了匿名权限,但在尝试使用生成的 Web 服务代理进行连接时收到“未经授权”。我尝试了很多设置(预验证等)。什么都不起作用。是否需要特殊配置,或者该 Web 服务无法通过匿名身份验证运行?
I am running an ASP.NET web application that connects to the WSS 3.0 search web service (spsearch.asmx).
The WSS site itself is configured for anonymous access: site search works with chrome, firefox and so on without the need of an authorization.
I also set anonymous rights for the spsearch.asmx, but I get an Unauthorized when trying to connect using the generated web service proxy. I tried a lot of settings (PreAuthenticate and so on). Nothing works. Is there a special configuration necessary, or doesn't work this web service with anonymous authentication?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
奇怪的是,无论 SharePoint 和 IIS 中的设置如何,您都无法使用任何具有匿名访问功能的内置 Web 服务。
您可以编写自己的 Web 服务来代理内置服务,并使用 IIS 工作人员帐户或其他“站点读者”帐户访问它们。
SharePoint 搜索服务和匿名访问
写作SharePoint 产品和技术的自定义 Web 服务
Strangely you can't use any of the built in web services with anonymous access regardless of settings in SharePoint and IIS.
You could write your own web service that would proxy for the built in ones and access them using the IIS worker account or another 'site reader' account.
The SharePoint Search Service and Anonymous Access
Writing Custom Web Services for SharePoint Products and Technologies
列表 listService = new Lists();
listService.Credentials = new System.Net.NetworkCredential("usr", "pass", "DOM");
listService.Url = "http://server/_vti_bin/Lists.asmx";
将 list.asmx 更改为 search.asmx dir
List 是 SharePoint 2010 Web 服务的 WebReference
Lists listService = new Lists();
listService.Credentials = new System.Net.NetworkCredential("usr", "pass", "DOM");
listService.Url = "http://server/_vti_bin/Lists.asmx";
change the list.asmx for search.asmx dir
List is the WebReference of the SharePoint 2010 web service