adding WCF reference to a workflow project

I'm building a workflow that uses a WCF service .. but in the workflow project I didn't add a direct reference to the WCF service, instead I've added a reference to a project that has this service reference, but now the designer isn't opening and it's giving me the following exception error:

System.Xaml.XamlObjectWriterException: 'The invocation of the constructor on type 'OrderingSystemWorkFlow.RegisterOrderBill' that matches the specified binding constraints threw an exception.' Line number '25' and line position '34'. ---> System.InvalidOperationException: Could not find default endpoint element that references contract 'ServiceReference1.IService1' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

How to solve this?


为什么不直接向您的WF项目添加服务引用?


When you add service reference of a wcf service in a activity library its turn into an activity and can drag drop on workflow. When you add service reference a config file is also added, copy the content of the config file basically that has a client and binding config section.

Please refer this link. http://blogs.msdn.com/b/endpoint/archive/2010/12/08/how-to-consume-a-wcf-service-from-a-wf4-workflow.aspx.

链接地址: http://www.djcxy.com/p/95880.html

上一篇: XAMLX工作流与C#表达式

下一篇: 将WCF引用添加到工作流程项目