未经授权访问WSS spsearch.asmx

时间:2009-09-09 10:07:18

标签: c# .net sharepoint wss

我正在运行一个连接到WSS 3.0搜索Web服务(spsearch.asmx)的ASP.NET Web应用程序。

WSS站点本身配置为匿名访问:站点搜索适用于chrome,firefox等,无需授权。

我还为spsearch.asmx设置了匿名权限,但在尝试使用生成的Web服务代理进行连接时,我获得了未授权。我尝试了很多设置(PreAuthenticate等)。什么都行不通。是否需要特殊配置,或者使用匿名身份验证不能使用此Web服务?

2 个答案:

答案 0 :(得分:1)

奇怪的是,无论SharePoint和IIS中的设置如何,您都无法使用任何具有匿名访问权限的内置Web服务。

您可以编写自己的Web服务来代理内置的Web服务,并使用IIS工作者帐户或其他“站点读者”帐户访问它们。

The SharePoint Search Service and Anonymous Access

Writing Custom Web Services for SharePoint Products and Technologies

答案 1 :(得分:0)

列表listService = new Lists();             listService.Credentials = new System.Net.NetworkCredential(“usr”,“pass”,“DOM”);             listService.Url =“http://server/_vti_bin/Lists.asmx”;

更改list.asmx for search.asmx dir

列表是SharePoint 2010 Web服务的WebReference