【问题标题】:How Can I Disable Security In WCF Service And Client Configuration Files如何在 WCF 服务和客户端配置文件中禁用安全性
【发布时间】:2014-04-08 14:36:38
【问题描述】:

我目前正在尝试将一些旧的 .NET Remoting 代码转换为 WCF。我对这两种技术都不是很有经验,并且很难理解如何配置服务和客户端配置文件。

我一直在使用 WCF 测试客户端和服务配置实用程序,并且能够通过 wsHttpBinding 将客户端连接到服务。但是,这仅适用于我的本地计算机,因为我尚未配置安全性。诚然,我目前不知道如何做到这一点。

我想修改下面的配置文件以暂时禁用安全性以用于学习目的,直到我完全了解如何配置安全性。有人可以就我需要做什么来关闭下面的服务和客户端配置文件中的安全性提供建议吗?

服务配置文件:

<system.serviceModel>
  <bindings />
        <behaviors>
            <serviceBehaviors>
                <behavior name="">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="true" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <services>
            <service name="FDServer.FuelServerService">
                <endpoint address="" binding="wsHttpBinding" bindingConfiguration=""
                    contract="FDServer.IFuelServerService">
                    <identity>
                        <dns value="localhost" />
                    </identity>
                </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
                <host>
                    <baseAddresses>
                        <add baseAddress="http://localhost:8732/Design_Time_Addresses/FDServer/FuelServerService/" />
                    </baseAddresses>
                </host>
            </service>
        </services>
    </system.serviceModel>

客户端配置文件:

  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IFuelServerService" />
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:8732/Design_Time_Addresses/FDServer/FuelServerService/"
          binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IFuelServerService"
          contract="IFuelServerService" name="WSHttpBinding_IFuelServerService">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>

【问题讨论】:

    标签: c# winforms wcf


    【解决方案1】:
    猜你喜欢
    • 2010-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-24
    • 2011-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多