English 中文(简体)
在使用AD账户访问WSS Lists.asmx web服务时出现未经授权的访问。
原标题:Unauthorised access when accessing WSS Lists.asmx web service using AD accounts

我遇到了一个问题,当我尝试在远程或本地站点访问Lists.asmx Web服务时,会出现401错误。要明确的是,这是/_vti_bin/Lists.asmx。我的设置是我有一个WSS 3.0站点,它通过SOAP连接到另一个WSS / MOSS站点的列表服务。在我们的舞台环境中,这两个站点位于同一台服务器上,但在开发中它们是分开的。无论什么情况,它们都在同一个域中。最初(在重建之前),Web服务调用在开发中正常工作,但是在舞台中不起作用,虽然令人困惑,但至少确认我的Web服务实现是正确的,问题是授权问题。这是我的最初的列表服务设置代码:

new Lists
{
     Url = Utility.AppSetting("WSS.Url", true),
     Credentials = new NetworkCredential
     {
           UserName = Utility.AppSetting("WSS.UserName", true),
           Password = Utility.AppSetting("WSS.Password", true),
           Domain = Utility.AppSetting("WSS.Domain", true)
     }
};

通过手动指定服务器上完全访问账户的域凭据与我相配合。然而,我怀疑上述代码并未实现任何功能,而服务只是使用AD进行身份验证,即我的应用程序池账户(在开发环境中是我的超级强大开发账户)。为减轻发布过程的负担,我希望能够明确设置服务的凭据,而不是依赖基础架构负责人将他的应用程序池账户提供读取/Web服务访问权限给远程WSS实例。

干杯

最佳回答

举例来说,问题是,回路检查是服务器2k8的一个问题。 拆掉这块.。

问题回答

尝试:

Credentials = System.Net.CredentialCache.DefaultCredentials

或者

Credentials = System.Net.CredentialCache.DefaultNetworkCredentials




相关问题
IIS 6.0 hangs when serving a web-service

I am having issues with one of our web-services. It works fine on my development machine (win XP) whether I host it as a separate application or using cassini from Visual studio. Once I deploy on the ...

ASP.net web services

I am using a web service which sets the Thread.CurrentPrincipal object while logging in and soon later when another webmethod of the same web service accesses Thread.CurrentPrincipal, its different/...

Unity Container Disposing and XML Web Service

I am registering some wrapers over un-managed objects in container. How can I dispose of them at the end of the container s lifetime? Please bear in mind I have an XML Web service.

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

热门标签