Visual Studio 2008 对 WCF 开发的支持及相关知识
1. 修改配置文件以改变通信方式
在开发过程中,有时需要改变客户端和服务端的通信方式,而无需重新编译代码。下面是具体的操作步骤:
1. 使用记事本打开 C:\WCFHandsOn\Fundamentals\DerivativesCalculatorSolution\Host\bin\Debug 文件夹下的 Host.exe.config 文件。
2. 将文件中的 binding=”basicHttpBinding” 修改为 binding=”netTcpBinding” 。
3. 保存文件。
4. 使用记事本打开 C:\WCFHandsOn\Fundamentals\DerivativesCalculatorSolution\Client\bin\Debug 文件夹下的 Client.exe.config 文件。
5. 修改该文件中的端点配置,使其如下所示:
<endpoint address=”net.tcp://localhost:8010/Derivatives/Calculator”
binding=”netTcpBinding”
contract=”IDerivativesCalculator”
name=”BasicHttpBinding_IDerivativesCalculator”/>
超级会员免费看
订阅专栏 解锁全文
1万+

被折叠的 条评论
为什么被折叠?



