我试图让WCF Discovery在单声道3.2.8中工作。单声道网页提到许多发现行为应该在那里,但是我无法通过代码设置或App.config设置来使其工作。这在.NET中是100%的工作,所以我知道至少这些原则是正确的。有没有什么办法可以在单声道中使用WCF发现?
这类似于在没有答案的问题: WCF Udp Discovery in 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'
,如果需要,我可以提供的代码,但由于我所要求的另一种方式作品我不相信这是需要的。
如果您参考Mono System.ServiceModel.Discovery in 4.5 - 您会注意到CreateBehavior()(位于:System.ServiceModel.Discovery.Configuration.ServiceDiscoveryElement)上有一个NotImplemented图标,这似乎是我的问题的根源。