生产服务器上的WCF身份验证问题 [英] WCF Authentication Issue on Production Server

查看:108
本文介绍了生产服务器上的WCF身份验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我们在IIS 6.0,Win Server 2003,.net 3.5 sp1上托管了WCF服务,并启用了集成的Windows身份验证,在登台服务器和生产服务器上均禁用了匿名访问. 在wcf web.config中的绑定是

Hi,
We have WCF services hosted on IIS 6.0, Win Server 2003,.net 3.5 sp1 with Integrated windows authentication enabled, Anonymous access disabled on both staging and production server.
And binding in wcf web.config is

  <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBindingConfig"  >
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>

and endpoint is configured like

<service behaviorConfiguration="SvcBehavior" name="MyService"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBindingConfig"  name="MyServiceEndpoint" contract="IMyService">
        </endpoint>
      </service>


此设置在登台服务器上非常有效,但是当我们将服务移至生产环境并尝试浏览WCF服务时,出现以下错误.
"此服务的安全设置需要Windows身份验证,但承载该服务的IIS应用程序未启用它."
但在我们的情况下,它在IIS和配置文件中均已启用.
我们还使用以下命令在登台服务器和生产服务器上验证了IIS网络身份验证
"cscript adsutil.vbs获取w3svc/WebSite/root/NTAuthenticationProviders"

它返回未在此节点上设置参数NTAuthenticationproviders".
通过在生产环境中进行上述设置,我们在客户端上出现以下错误
"远程服务器返回错误:(401)未经授权.
但是一切都可以在分阶段正常进行.

请建议


This setting works perfect in staging server, but when we moved services to production, and tried browsing WCF service, we got following error.
"Security settings for this service requires Windows authentication but it is not enabled for IIS application that hosts this service."
but it is enabled in our case in both IIS and config file.
We have also verified IIS network authentication on both staging and production server using following command
"cscript adsutil.vbs get w3svc/WebSite/root/NTAuthenticationProviders"

It returns " The parameter NTAuthenticationproviders is not set at this node".
With the above settings in production environment we got following error on client
"The remote server returned error: (401) unauthorized.
But everything works fine on staging.

Kindly suggest

推荐答案

我假设您需要证书...(我认为):)
i suppose you need a certificate... (i suppose) :)


这篇关于生产服务器上的WCF身份验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆