Search code examples
wcfwcf-binding

WCF security errors


I recently made a change to a working web application with a wcf service in it. After publishing the thing I get error Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service..

I have been searching the net for the past five hours trying to make heads or tails on this

I have anoynous authorization unchecked...

Here is the web service section from my web.config, please help!!!

<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IService1" >

  <security mode="TransportWithMessageCredential">
    <transport clientCredentialType="Windows"/>
  </security>

</binding>
</wsHttpBinding>



</bindings>
<client>
<!--http://localhost:2083/Service1.svc-->
 <endpoint address="" binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_IService1" contract="ServiceReference1.IService1"
 name="WSHttpBinding_IService1">
 <identity>
 <dns value="issupport03" />
 </identity>
 </endpoint>
</client>
 <services>
 <service name="WcfService1.AjaxWcf">
 <endpoint address="" behaviorConfiguration="WcfService1.AjaxWcfAspNetAjaxBehavior"
 binding="webHttpBinding" contract="WcfService1.AjaxWcf" />
 </service>
 </services>
    <behaviors>
<endpointBehaviors>
<behavior name="WcfService1.AjaxWcfAspNetAjaxBehavior">
 <enableWebScript />
</behavior>
 </endpointBehaviors>
<serviceBehaviors>
 <behavior name="WcfService1.AjaxWcfAspNetAjaxBehavior">
   <serviceDebug includeExceptionDetailInFaults="True"/>
 </behavior>
</serviceBehaviors>
</behaviors>

Solution

  • Basically what I did to fix it was change from wsHttpBinding to webHttpBinding with:

    <security mode="TransportCredential">
     <transport clientCredentialType="Windows"/>
    </security>
    

    It works now, and since its on an intranet I'm not worried about security issues at this point...however, I really wish I knew why it broke and what I should have done to fix it...

    Thanks to all who helped!!!