none
basicHttpBinding&HTTPS&Basic authentication and error 401: Unauthorized RRS feed

  • Question

  • Hi,
    Service is configured to basicHttpBinding, transport security and basic transport authorisation.

    My client receives this error ("The request failed with HTTP status 401: Unauthorized.") on calling the service.  In the system Security log I receive Successful authentication record.  Also, if I give incorrect password, I receive 401: Access Denied.  So, the problem is not in incorrect password.  I receive same error calling the service from my machine or from another one.  The Certificate is valid as well.  If I remove basic authorisation, it works fine.

    The Client is a SQL Server CLR.

    Much appreciate your advice.
    Thanks.

    Part of the web.config



    	<system.serviceModel>
    		<bindings>
       <basicHttpBinding>
        <binding name="BindingSSL_PWD">
         <security mode="Transport">
          <transport clientCredentialType="Basic" proxyCredentialType="None" />
         </security>
        </binding>
       </basicHttpBinding>
      </bindings>
      <diagnostics wmiProviderEnabled="true" performanceCounters="All">
       <messageLogging logEntireMessage="true" logMalformedMessages="true"
        logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
      </diagnostics>
      <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
      <services>
       <service behaviorConfiguration="ServiceBehavior" name="XXXXXX">
        <endpoint address="https_pwd" binding="basicHttpBinding" bindingConfiguration="BindingSSL_PWD"
         name="NAME" contract="IXXXXXX" />
       </service>
      </services>
    		<behaviors>
       <serviceBehaviors>
        <behavior name="ServiceBehavior">
         <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
       </serviceBehaviors>
      </behaviors>
    	</system.serviceModel>

    Wednesday, April 29, 2009 10:30 AM

Answers