您的位置:首页 > 其它

WWF印象(2):示例ExpenseReporting,试试不是本机Host

2006-03-24 09:17 369 查看
ExpenseReporting,是WWF示例中比较完整的一个,可以到这里http://www.windowsworkflow.net/下载最新的版本,要想正确运行,请先下载安装WinFX Runtime,编译 ExpenseReporting,运行
之前对WWF Host概念比较模糊,仔细看了ExpenseReporting之后,比较清楚了,
在ExpenseHost.exe,有一个配置文件ExpenseHost.exe.config,其中有一段

<system.serviceModel>
<services>
<service name="ExpenseLocalServices.ExpenseService">

<!-- Use base address provided by host. -->
<!-- Specify BasicProfile binding and a binding configuration to use. -->
<endpoint
address="http://tianchi-cleo:8081/WFSamples/ExpenseService"
binding="wsHttpBinding"
contract="ExpenseContracts.IExpenseService" />
</service>
</services>
</system.serviceModel>
其中http://tianchi-cleo:8081/WFSamples/ExpenseService就是你Host的地址,我认为,ExpenseHost.exe最终在这个地址端口建立一个服务,这样,ExpenseApplication.exe和ManagerApplication.exe可以同过这个端口进行通讯。因为你在ExpenseApplication.exe.config和ManagerApplication.exe.config可以看到相似的配置片断,(你如果要修改,请一定要改成一致,否则。。。)我们之前一直迷惑怎么进行非本机的Host,现在清楚了,只要改成远程地址就可以了。
运行结果如下:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐