开发者

WCF security errors

开发者 https://www.devze.com 2022-12-13 13:06 出处:网络
I recently made a change to a working web application with a wcf service in it. After publishing the thing I get errorSecurity settings for this service require \'Anonymous\' Authentication but it is

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">开发者_StackOverflow
 <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>


Check the identity that your application pool is running under. This user may not have access to any resources it could be using.


I recommend that you backup your current code, then revert to the previous version from source control. Build and deploy that version, then make sure it works in production.

If that worked, then diff the production version against your backup version. See what changed. Change it back little by little until it works again.


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!!!

0

精彩评论

暂无评论...
验证码 换一张
取 消