Click here to Skip to main content
15,887,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have referred the article
8 steps to enable windows authentication on WCF BasicHttpBinding

I have one problem in this one. If we are using windows authentication then while browsing the service URL why it is asking for user name and password. why it is not taking my windows credentials default.

My web.config file settings are:

C#
<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="netTcpBinding">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client />
    <services>
      <service behaviorConfiguration="WcfXMLExportService.XMLParsingBehavior"
        name="WcfXMLExportService.XMLParsing">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="netTcpBinding" contract="WcfXMLExportService.IXMLParsing">
          <identity>
            <dns value="" />
          </identity>
        </endpoint>
        <!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />-->
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WcfXMLExportService.XMLParsingBehavior">
          <serviceMetadata httpGetEnabled="true" />

          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

Please give the solution to acheive this.

Thanks in advance.
Posted
Updated 3-Jan-12 2:12am
v3
Comments
JF2015 20-Dec-11 4:31am    
Please post you question in the forum at the end of this article.
RaviRanjanKr 20-Dec-11 4:44am    
You forget to embedded link. please fix it.
Pankaj Chamria 3-Jan-12 8:53am    
Due to browser security considerations, you will get the login prompt at least once, upon which you can choose to tick the Remember credentials checkbox. Even then in some environments, you may have to input the username/ password each time you open a new instance of browser to access your service.

1 solution

Try this config.
HTML
<binding name="BasicHttpEndpointBinding">
     <security mode="TransportCredentialOnly">
       <transport clientCredentialType="Windows" />
     </security>
   </binding>
 
Share this answer
 
v2
Comments
RaisKazi 20-Dec-11 5:18am    
Edited: Added "pre" tag.
[no name] 20-Dec-11 23:54pm    
Already it is transportcredentialonly settings in my web.config file. I have updated my question you can check now my settings.
Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900