Answered WCF web.config file for SSL

  • Monday, June 11, 2012 3:12 AM
     
      Has Code

    Hi All,

    I am using web application with claims based authentication with windows authentication enabled and integrated windows authentication type is 'NTLM' and SSL is configured for that web application

    Below is my WCF web.config file .The WCF service is deployed to ISAPI folder

    <configuration> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="MyServiceTypeBehaviors" > <serviceMetadata httpsGetEnabled="true" /> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> <services> <service name="Service" behaviorConfiguration="MyServiceTypeBehaviors"> <endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="IService" /> <endpoint contract="IMetadataExchange" binding="mexHttpsBinding" address="mex" /> </service> </services> <bindings> <wsHttpBinding> <binding name="TransportSecurity"> <security mode="Transport"> <transport clientCredentialType="Ntlm"/> </security> </binding> </wsHttpBinding> </bindings> </system.serviceModel>

    I am receiving below error when consumed in console application

    ServiceClient dc=new ServiceClient();

    dc.MehtodName();

    Error:-The HTTP request is unauthorized with client authentication scheme 'Ntlm'.

    The authentication header received from the server was 'NTLM'.

    Thanks in advance,

    Spoorthi


    • Edited by spoorthi Monday, June 11, 2012 6:30 PM
    •  

All Replies