Ajitender Vijay

Ajitender Vijay

  • NA
  • 263
  • 121k

Authentication but it is not enabled for the IIS application

Feb 7 2013 4:10 AM

I am struggling hard with getting WCF service running on IIS on our server. After deployment I end up with an error message:


Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NotSupportedException: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


 my web.Coinfig

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 
  
    <startup useLegacyV2RuntimeActivationPolicy="true" >
        <supportedRuntime version="v4.0" />
    </startup>
 
    <system.web>
     
     
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
    <authentication mode="Forms" />  
  </system.web>
   
  <system.serviceModel>
     
    <extensions>
      <behaviorExtensions>
        <add name="WsdlExtensions" type="WCFExtrasPlus.Wsdl.WsdlExtensionsConfig, WCFExtrasPlus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        <add name="CSLOrderingAPICommon.ErrorHandlerBehavior" type="CSLOrderingAPICommon.ErrorHandlerBehavior, DevLake.BasicAuth.Common, Version=1.0.0.0, Culture=neutral" />
      </behaviorExtensions>
    </extensions>
    <bindings>
       
   
      <basicHttpBinding>
        <!-- for https binding-->
        <binding name="http_transport_basic">
            <security mode="TransportCredentialOnly" >
                <transport clientCredentialType ="Basic"></transport>
            </security >
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
       
          <behavior>
            <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
         
    </behaviors>
     
      <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
        <directoryBrowse enabled="true" />
  </system.webServer>
</configuration>


Answers (1)