Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 有没有办法在mono中使用WCF发现?_C#_.net_Wcf_Mono_Discovery - Fatal编程技术网

C# 有没有办法在mono中使用WCF发现?

C# 有没有办法在mono中使用WCF发现?,c#,.net,wcf,mono,discovery,C#,.net,Wcf,Mono,Discovery,我正在尝试让WCF发现在mono 3.2.8中工作。mono网页提到很多发现行为都应该存在,但我无法通过代码设置或App.config设置使其工作。这在.net中100%有效,所以我知道至少原则是正确的 这与以下未回答的问题类似: 但是,我的具体问题是:有没有办法在mono中使用WCF发现 App.config安装程序出现以下错误: [ERROR] FATAL UNHANDLED EXCEPTION: System.Configuration.ConfigurationErrorsExcept

我正在尝试让WCF发现在mono 3.2.8中工作。mono网页提到很多发现行为都应该存在,但我无法通过代码设置或App.config设置使其工作。这在.net中100%有效,所以我知道至少原则是正确的

这与以下未回答的问题类似:

但是,我的具体问题是:有没有办法在mono中使用WCF发现

App.config安装程序出现以下错误:

[ERROR] FATAL UNHANDLED EXCEPTION: System.Configuration.ConfigurationErrorsException:
Error deserializing configuration section behaviors: 
Invalid element in configuration. The extension name 'serviceDiscovery' is not 
registered in the collection at system.serviceModel/extensions/behaviorExtensions
System.InvalidOperationException: Contract 'TargetService' is not implemented 
in this service 'MyService'
代码安装程序出现以下错误:

[ERROR] FATAL UNHANDLED EXCEPTION: System.Configuration.ConfigurationErrorsException:
Error deserializing configuration section behaviors: 
Invalid element in configuration. The extension name 'serviceDiscovery' is not 
registered in the collection at system.serviceModel/extensions/behaviorExtensions
System.InvalidOperationException: Contract 'TargetService' is not implemented 
in this service 'MyService'
如果需要的话,我可以提供代码,但因为我要求的是另一种可行的方法,所以我认为目前不需要它


如果您引用-您会注意到CreateBehavior()上有一个NotImplemented图标(位于:System.ServiceModel.Discovery.Configuration.ServiceDiscoveryElement),这似乎是我的问题的根本原因。

我也遇到了同样的问题。我已经尝试了很多方法,但我也无法让它发挥作用。我认为您已经找到了CreateBehavior()未实现的问题的根本原因

我确实为我的应用程序创建了一个变通方案,尽管它没有纯WCF解决方案那么干净。使用mono项目的实现发布服务,然后在客户端(同样使用zeroconf)浏览它,这对我来说很有用。找到服务后,我使用zeroconf结果创建WCF代理

我的用途是为同一子网上的内部客户机提供内部服务,这使实现相对容易。我不确定它是否/如何跨子网工作,但根据“零配置网络:最终指南”(柴郡,塞恩堡),它是可以做到的