WWF印象(2):示例ExpenseReporting,试试不是本机Host
  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,现在清楚了,只要改成远程地址就可以了。
运行结果如下:
之前对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>运行结果如下:
posted on 2006-03-14 09:27 无为而为-凡事从积极的态度做起 阅读(206) 评论(0) 收藏 举报
                    
                
                
            
        
浙公网安备 33010602011771号