我目前正在尝试将一些旧的.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>
答案 0 :(得分:0)