English 中文(简体)
WCF 以运输方式提供服务,导致《吉大港山区地位法》第401条错误,编号为IIS7 [封闭式]
原标题:WCF service with TransportCredentialOnly security mode causing HTTP status Code 401 error on IIS7 [closed]

我刚刚花了2天的时间来总结以下错误,因此我可以分享我的调查结果。

The scenario is this: I have a WCF service hosted on IIS7. The service uses basicHttpBinding with Security Mode set to TransportCredentialOnly. The web site has Anonymous Authentication and Windows Authentication enabled. The Appliaction Pool for the website runs under a domain account, wich has every possible right on the physical folder of the website. Browsing the .svc for the service from internet explorer worked, but when we tried to invoke a method of the service from a client, we got an error: "The HTTP request is unauthorized with client authentication scheme Negotiate". Also, the IIS log showed a 401.5 error for every invoke of the method, wich is normal for this security setting, but it should be followed by a 200, wich wasn t the case here.

最后,我们设法通过在上检查Austhentication context,解决这一问题。 Windows Authentication在那里残疾。 我们得以做到这一点,这项服务已经开始工作。 你们会认为,网站环境胜过这一点,但却没有。 因此,除去电 wire外,每天开mon,检查情况。

Cheers!

问题回答

这是你需要找到环境,在以下所有层面进行匹配的问题:

  • The App.config on the client
  • The IIS Settings
  • The App Pool Indentity
  • The NTFS rights on the svc file
  • The Web.Config on the server

所有这些都需要与工作相匹配。





相关问题
WCF DataMember Serializing questions

Ok, so I was part way through the long winded process of creating DTOs for sending my model over the wire and I don t feel like I m going down the right route. My issue is that most of the entities ...

Access WCF service on same server

I have a .NET website with a WCF service. How do I access the current operations context of my service? One possible work around is to just make a call to the service within the app...but that seems ...

WCF binding error

So I got into work early today and got the latest from source control. When I try to launch our ASP.NET application, I get this exception: "The binding at system.serviceModel/bindings/wsHttpBinding ...

The service operation requires a transaction to be flowed

I am facing strange issue with our WCF service. The same code was working fine until recently we added more OperationContracts(Web Methods). We have common 3 tier architecture. DAL (WCF) BLL Web ...

热门标签