Authentication Scenarios

First We have the web config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <identity impersonate="false" />
  </system.web>
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel.MessageLogging" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add type="System.Diagnostics.DefaultTraceListener" name="Default">
            <filter type="" />
          </add>
          <add name="ServiceModelMessageLoggingListener">
            <filter type="" />
          </add>
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add initializeData="c:\shares\logs\messages.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
        <filter type="" />
      </add>
    </sharedListeners>
  </system.diagnostics>
  <system.serviceModel>
    <diagnostics>
      <messageLogging logEntireMessage="true" logMalformedMessages="true"
        logMessagesAtTransportLevel="true" />
    </diagnostics>
    <services>
      <service name="RequestServiceLibrary.RequestService">
        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="MyTransportBasicBinding"
          name="WSEndpoint" contract="RequestServiceLibrary.IRequestService" />
        <endpoint address="mex" binding="mexHttpsBinding" bindingConfiguration=""
          name="MexEndpoint" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="https://drawin.cs.southern.edu/rsb" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <bindings>
      <wsHttpBinding>
        <binding name="MyTransportWindowsBinding">
          <security mode="Transport">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
        <binding name="MyTransportBasicBinding">
          <security mode="Transport">
            <transport clientCredentialType="Digest" />
            <message clientCredentialType="None" />
          </security>
        </binding>
        <binding name="MyMessageUsernameBinding">
          <security mode="Message">
            <message clientCredentialType="UserName" />
          </security>
        </binding>
        <binding name="MyMixedIssuedTokenBinding">
          <security mode="TransportWithMessageCredential">
            <message clientCredentialType="IssuedToken" />
          </security>
        </binding>
        <binding name="MyMixedUsernameBinding">
          <security mode="TransportWithMessageCredential">
            <message clientCredentialType="UserName" />
          </security>
        </binding>
      </wsHttpBinding>
    </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" />
  </system.webServer>
</configuration>

Next we delineate the IIS Config:

     Anonymous Authentication = Enabled
     Digest Authentication = Enabled
     Windows Authentication = Enabled
     * = Disabled

This combination works for some reason! However, it only will authenticate using your logged on Credentials!

WebServices/WcfAuthScenarios (last edited 2011-09-18 23:37:05 by 71-87-243-206)