Quantcast
Channel: Questions in topic: "pipe"
Viewing all articles
Browse latest Browse all 89

Consume WCF Service

$
0
0
Hi all, I am completely new to Unity and this is my first post. My question is related to IPC; more precisely: I would like to use a WCF Service (via Named Pipe) in my Unity application. Thus, I copied the file *System.ServiceModel.dll* from *Editor/Data/Mono/lib/mono/2.0* to a newly created directory named *Plugins* in my Assets directory. Then, I included the following two Namespaces: using System.ServiceModel; using System.ServiceModel.Channels; And, with the following commands, I want to create a proxy of type NamedPipe: ChannelFactory pipeFactory = new ChannelFactory(new NetNamedPipeBinding(),new EndpointAddress("net.pipe://localhost/PipeReverse")); ClassName pipeProxy = pipeFactory.CreateChannel(); After I run my project in Unity, I get the following error: > InvalidOperationException: Channel type IDuplexSessionChannel is not supported. System.ServiceModel.Channels.NamedPipeChannelFactory1[System.ServiceModel.Channels.IDuplexSessionChannel].OnCreateChannel (System.ServiceModel.EndpointAddress address, System.Uri via) System.ServiceModel.Channels.ChannelFactoryBase1[System.ServiceModel.Channels.IDuplexSessionChannel].CreateChannel (System.ServiceModel.EndpointAddress remoteAddress, System.Uri via) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) System.ServiceModel.ClientRuntimeChannel..ctor (System.ServiceModel.Dispatcher.ClientRuntime runtime, System.ServiceModel.Description.ContractDescription contract, TimeSpan openTimeout, TimeSpan closeTimeout, IChannel contextChannel, IChannelFactory factory, System.ServiceModel.Channels.MessageVersion messageVersion, System.ServiceModel.EndpointAddress remoteAddress, System.Uri via) System.ServiceModel.ClientRuntimeChannel..ctor (System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.ChannelFactory channelFactory, System.ServiceModel.EndpointAddress remoteAddress, System.Uri via) __clientproxy_ClassName..ctor (System.ServiceModel.Description.ServiceEndpoint , System.ServiceModel.ChannelFactory , System.ServiceModel.EndpointAddress , System.Uri ) System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:513) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:519) System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:528) System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Activator.cs:338) System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Activator.cs:268) System.Activator.CreateInstance (System.Type type, System.Object[] args) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Activator.cs:263) System.ServiceModel.ChannelFactory1[ClassName].CreateChannel (System.ServiceModel.EndpointAddress address, System.Uri via) System.ServiceModel.ChannelFactory1[ClassName].CreateChannel (System.ServiceModel.EndpointAddress address) System.ServiceModel.ChannelFactory`1[ClassName].CreateChannel () IDL_vehicle.Start () (at Assets/Scripts/IDL_vehicle.cs:30)

Viewing all articles
Browse latest Browse all 89

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>