繁体   English   中英

自托管WCF数据服务身份验证

[英]Self-hosted WCF Data service authentication

我已经以类似的方式设置了自托管WCF数据服务-http://blogs.msdn.com/b/writingdata_services/archive/2011/01/24/self-hosting-a-wcf-data-service。 aspx

如何在此基础上添加Windows身份验证?

我知道如何在IIS中添加它,但是自托管方案正在使我逃脱...

提前致谢!

诀窍是使用app.config并在那里配置所有安全设置...:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.serviceModel>
    <bindings>
      <webHttpBinding>
        <binding name="MyBindingName" >
          <security mode="Transport">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </webHttpBinding>
    </bindings>
    <services>
      <service name="{you service type name including the namespace i.e. myapplication.myservice}">
        <endpoint address="" binding="webHttpBinding" bindingConfiguration="MyBindingName" contract="System.Data.Services.IRequestHandler">
        </endpoint>
      </service>
    </services>
  </system.serviceModel>
</configuration>

请参阅此问题以获取详细答案。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM