c# - Disabling Anonymous authentication for web application causes error -
i trying enable windows authentication , disable anonymous authentication intranet application. have enabled windows authentication , disabled anonymous in iis7, , set web.config use windows authentication.
<system.web> <authentication mode="windows" /> <compilation debug="true" targetframework="4.0" /> </system.web> when deploy , run application, page header load. when navigate service.svc file in chrome or ie, following error:
security settings service require 'anonymous' authentication not enabled iis application hosts service.
system.notsupportedexception: security settings service require 'anonymous' authentication not enabled iis application hosts service.
i assume problem web.config or service.svc.cs, cannot identify it. happens 1 service. enabling anonymous authentication in iis7 resolve issue, need disabled.
in servicerefernces.clientconfig, have:
<configuration> <system.servicemodel> <bindings> <basichttpbinding> <binding name="basichttpbinding_iservice" maxbuffersize="2147483647" maxreceivedmessagesize="2147483647"> <security mode="none" /> </binding> </basichttpbinding> </bindings> <client> <endpoint address="http://ohara-win7/nightlyweb/service.svc" binding="basichttpbinding" bindingconfiguration="basichttpbinding_iservice" contract="servicereference2.iservice" name="basichttpbinding_iservice" /> </client> </system.servicemodel> </configuration> i have seen lot of posts people told set transportclientcredentialtype ntlm, visualstudio not recognize element.
i figured out. after further comparison 1 of manager's projects, noticed supposed add code web.config, , not servicereferences.clientconfig thought needed to.
<system.servicemodel> <bindings> <basichttpbinding> <binding> <security mode="transportcredentialonly"> <transport clientcredentialtype="windows" /> </security> </binding> </basichttpbinding> </bindings> </system.servicemodel>
Comments
Post a Comment