在WCF中需要帮助以进行Winodws身份验证 [英] Need help in WCF for winodws authentication

查看:58
本文介绍了在WCF中需要帮助以进行Winodws身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经推荐了该文章
在WCF BasicHttpBinding上启用Windows身份验证的8个步骤

我有一个问题.如果我们使用Windows身份验证,则在浏览服务URL时为什么会要求输入用户名和密码.为什么它没有将我的Windows凭据设置为默认值.

我的web.config文件设置为:

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:

<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.

推荐答案

尝试此配置.
Try this config.
<binding name="BasicHttpEndpointBinding">
     <security mode="TransportCredentialOnly">
       <transport clientCredentialType="Windows" />
     </security>
   </binding>


这篇关于在WCF中需要帮助以进行Winodws身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆