简体   繁体   中英

Security setting for WCF service requires anonymous authentication

I am trying to create a WCF service but getting following error. Error: Security service for this service require Anonymous authentication. I found similar problems but their solution did not work for me.

 <system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="CMSUI.DataServiceAspNetAjaxBehavior">


          <enableWebScript/>
        </behavior>
      </endpointBehaviors>

</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
  <service name="CMSUI.DataService" >
    <endpoint address="" behaviorConfiguration="CMSUI.DataServiceAspNetAjaxBehavior"
      binding="webHttpBinding" contract="CMSUI.DataService" />
  </service>
</services>

Thanks for the help.

For the time being i enabled anonymous access in iis and disabled anonymous access in web.config. It solved my problem.

web.config

 <authorization>
    <deny users="?" />
    <allow users="*"/>
 </authorization>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM