【发布时间】:2014-06-04 14:39:44
【问题描述】:
我使用 Visual Studio 2008 开发了一个 C# WCF 客户端应用程序,它运行良好。客户端应用程序使用 wcf 包装类并使用 WCF 服务。但是,当我使用 MonoDevelop IDE 在 Redhat Linux 6.5 中执行相同的源代码时,我在创建 wcf 对象时遇到了以下异常。 WCF Web 服务作为 Windows 服务运行。
{System.NotImplementedException:请求的功能未实现。在 System.ServiceModel.Configuration.WSHttpBindingElement.OnApplyConfiguration(System.ServiceModel.Channels.Binding 绑定)[0x00000] 在 /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.ServiceModel/System.ServiceModel .Configuration/WSHttpBindingElement.cs:101 在 System.ServiceModel.Configuration.StandardBindingElement.ApplyConfiguration (System.ServiceModel.Channels.Binding 绑定) [0x00030] 在 /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class /System.ServiceModel/System.ServiceModel.Configuration/StandardBindingElement.cs:143 在 /home/abuild/rpmbuild/BUILD/ 中的 System.ServiceModel.Configuration.ConfigUtil.CreateBinding(System.String 绑定,System.String bindingConfiguration)[0x00053] mono-3.4.0/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs:104 在 System.ServiceModel.ChannelFactory.ApplyConfiguration (System.String endpointConfig) [0x000e9] 在 /home/abuild/rpmbuild/ BUILD/mono-3.4.0/mcs/class/System.ServiceModel/System.ServiceModel/Cha nnelFactory.cs:156 在 System.ServiceModel.ChannelFactory.InitializeEndpoint (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00024] 在 /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System .ServiceModel/System.ServiceModel/ChannelFactory.cs:309 在 System.ServiceModel.ChannelFactory
1[IMyMonitor]..ctor (System.String endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) [0x00017] in /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs:73 at System.ServiceModel.ClientBase1[IMyMonitor].Initialize(System.ServiceModel.InstanceContext 实例,System.String endpointConfigurationName,System.ServiceModel.EndpointAddress remoteAddress)[0x00000]在 /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs:159 在 System.ServiceModel.ClientBase1[IMyMonitor]..ctor (System.ServiceModel.InstanceContext instance, System.String endpointConfigurationName) [0x00028] in /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs:90 at System.ServiceModel.ClientBase1[IMyMonitor]..ctor ( System.ServiceModel.InstanceContext 实例)[0x00000] 在 /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs:79 在 System.ServiceModel.ClientBase` 1[IMyMonitor]..ctor () [0x00000] 在 /home/abuild/rpmbuild/BUILD/mono-3.4.0/mcs/class/System.Service Model/System.ServiceModel/ClientBase.cs:54 在 SenMonitorClient..ctor () [0x00000] 在 /mywork/myclient/wcfService.cs:1429 在 myclient.start () [0x0079c] 在 /mywork/myclient/Program.cs :285 } System.NotImplementedException
环境: MonoDevelop 4.2.3、mono 3.4.0
感谢您的帮助。
【问题讨论】:
-
@chuex,你的意思是在客户端代码中重复
-
从 Mono 的实现不完整的意义上说,这是重复的,这就是另一个问题中接受的答案所陈述的内容。此外,您的堆栈跟踪似乎与另一个相同。
-
@HPFE455 - Mono 的 WS-Security 实现存在已知问题,看起来它在 3.4.0 中仍然存在。什么是绑定类型/安全模式?在将其移植到 Mono 时,您可能需要检查这些内容。
-
@Thinkster,绑定类型是 WSHttpBinding。除了使用包装器,我可以使用其他方式直接使用 Web 服务吗?
标签: linux wcf mono monodevelop redhat