Tech Off Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Windows Authentication

Back to Forum: Tech Off
  • User profile image
    osrizo

    Hope You could help me with th following issue!

    I made a new WCF service but I need Windws Authentification.  I have all ready enable it and disabled the anonymous in IIS7

    this is my web.Config,  What is missing or wrong??   

     

    <?xml version="1.0"?>
    <configuration>

      <system.web>
        <compilation debug="false" targetFramework="4.0" />
          <authentication mode ="Windows" >
          </authentication>
      </system.web>
       <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="basicHttpBindingConfig" messageEncoding="Text">
              <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Windows" proxyCredentialType="Windows" />
              </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="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
      </system.serviceModel>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>
     
    </configuration>

     

    And This is the error when I explore my Service

    Server Error in '/Operacion' Application.

    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.

     

  • User profile image
    blowdart

    Where are you attaching the binding configuration to the service? You've got the configuration bits right, but don't seem to be applying them anywhere (although admittedly I haven't looked much at WCF 4.0's new easier config)

  • User profile image
    osrizo

    blowdart said:

    Where are you attaching the binding configuration to the service? You've got the configuration bits right, but don't seem to be applying them anywhere (although admittedly I haven't looked much at WCF 4.0's new easier config)

    Upsss es verdad me faltaba el endpoint 

    <services>
         <service name ="Service">
           <endpoint address ="Service" binding ="basicHttpBinding" bindingConfiguration="basicHttpBindingConfig" contract="IService">
           </endpoint>
         </service>

    </services>

     

     

    Saludos

  • User profile image
    blowdart

    osrizo said:
    blowdart said:
    *snip*

    Upsss es verdad me faltaba el endpoint 

    <services>
         <service name ="Service">
           <endpoint address ="Service" binding ="basicHttpBinding" bindingConfiguration="basicHttpBindingConfig" contract="IService">
           </endpoint>
         </service>

    </services>

     

     

    Saludos

    Hmm darn, looks good.

  • User profile image
    bitdisaster

    blowdart said:
    osrizo said:
    *snip*

    Hmm darn, looks good.

    I don't know whether you posted your complete config, but if you have specified a mex endpoint somewhere in your config  then remove it.

    The mex endpoint looks like this:

     

     

    <endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange"></endpoint>

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.