/*Author: Jiangong SUN*/
I've encountered a problem when I deploy a web service in a new environment. While I've used the same binary work correctly in another server.
Here is a error message:
System.ServiceModel.ServiceActivationException: The service '' cannot be activated due to an exception during compilation.
The exception message is: The authentication schemes configured on the host ('IntegratedWindowsAuthentication') do not allow those configured on the binding 'WSHttpBinding' ('Anonymous'). Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly.
Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the <serviceAuthenticationManager> element, by updating the ClientCredentialType property on the binding, or by adjusting the AuthenticationScheme property on the HttpTransportBindingElement.. ---> System.NotSupportedException: The authentication schemes configured on the host ('IntegratedWindowsAuthentication') do not allow those configured on the binding 'WSHttpBinding' ('Anonymous').
So I've found that it shouldn't be a problem of my code, while it's a problem of IIS configuration.
To check the configuration, you need to go to -> %systemroot%\System32\inetsrv\config
You can compare all the configurations between this server and another server where the service works in.
For me, it was a configuration problem in applicationHost.config. And I just need to activate the anonymous anthentication.
<location path="DEV.MARKET.Global">
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" />
<windowsAuthentication enabled="true" authPersistNonNTLM="true" />
</authentication>
</security>
</system.webServer>
</location>
So the probme is solved!
Hoping this post can help others! :)
本文解决了在新环境中部署WebService遇到的认证配置问题。错误提示显示主机的认证方式(IntegratedWindowsAuthentication)不允许绑定中配置的方式(Anonymous)。通过调整IIS设置并激活匿名认证,成功解决了这一问题。
2961

被折叠的 条评论
为什么被折叠?



