c# - NetNamedPipeBinding: parameter in pipe method is empty -


i have servicehost listening on netnamedpipebinding endpoint. have service contract class single method being called client , handled server. method (we'll call piperequest()) has request parameter. on client side populate object it's empty time gets sent on server. ideas why case?

_host = new servicehost(typeof(pipeservice), new uri(servicerequestrouter.uri)); _host.addserviceendpoint(     typeof(ipipeservice),     new netnamedpipebinding(),     _pipename ); _host.open();  [servicecontract(namespace = "http://www.example.com/pipecommunication")] interface ipipeservice {     [operationcontract]     void piperequest(servicerequestbase request); }  [datacontract] [knowntype(typeof(derivedservicerequest))] [knowntype(typeof(someenumtype))] public abstract class servicerequestbase {     ...      public void dispatch(string ppipename = servicerequestrouter.defaultpipename)     {         endpointaddress epa = new endpointaddress(_address_));         ipipeservice proxy = channelfactory<ipipeservice>.createchannel(new netnamedpipebinding(), epa);         proxy.piperequest(this);     } } 

it has proxy.piperequest(this); you need pass in class inherits servicerequestbase, if class inherit servicerequestbase might not serializable.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -