DroleDeCerfeuil
06-28-2007, 12:57 PM
Hi all !
I would like to use a remote service exposed via Spring.Net Remoting. The server is host by IIS and the communication protocol is http with a binary serialization.
The remote service is define in the server's Spring.Config file :
<object name="remoteElementService" type="Spring.Remoting.SaoExporter, Spring.Services">
<property name="TargetName" value="businessElementService" />
<property name="ServiceName" value="RemotedBusinessElementService.rem" />
<property name="Infinite" value="false" />
</object>
In the Web.Config file, the remoting configuration :
<system.runtime.remoting>
<application>
<channels>
<channel ref="http">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
Client side, I get a ref on the remote service by :
_boElementSvc = (IBusinessElementRemoteService)ctx.GetObject("businessElementRemoteService");
This part is OK. Now the problem is when I try to define a property of this service. For exemple :
_boElementSvc.Culture = _Application.Current.CurrentCulture;
I got a ArgumentNullException :
System.ArgumentNullException: No message was deserialized prior to calling the DispatchChannelSink.
Parameter name: requestMsg
at System.Runtime.Remoting.Channels.DispatchChannelSi nk.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) at System.Runtime.Remoting.Channels.BinaryServerForma tterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) at System.Runtime.Remoting.Channels.Http.HttpHandlerT ransportSink.HandleRequest(HttpContext context) at System.Runtime.Remoting.Channels.Http.HttpRemoting Handler.InternalProcessRequest(HttpContext context)
If anyone has an idea ...
Thanks
Fred
I would like to use a remote service exposed via Spring.Net Remoting. The server is host by IIS and the communication protocol is http with a binary serialization.
The remote service is define in the server's Spring.Config file :
<object name="remoteElementService" type="Spring.Remoting.SaoExporter, Spring.Services">
<property name="TargetName" value="businessElementService" />
<property name="ServiceName" value="RemotedBusinessElementService.rem" />
<property name="Infinite" value="false" />
</object>
In the Web.Config file, the remoting configuration :
<system.runtime.remoting>
<application>
<channels>
<channel ref="http">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
Client side, I get a ref on the remote service by :
_boElementSvc = (IBusinessElementRemoteService)ctx.GetObject("businessElementRemoteService");
This part is OK. Now the problem is when I try to define a property of this service. For exemple :
_boElementSvc.Culture = _Application.Current.CurrentCulture;
I got a ArgumentNullException :
System.ArgumentNullException: No message was deserialized prior to calling the DispatchChannelSink.
Parameter name: requestMsg
at System.Runtime.Remoting.Channels.DispatchChannelSi nk.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) at System.Runtime.Remoting.Channels.BinaryServerForma tterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) at System.Runtime.Remoting.Channels.Http.HttpHandlerT ransportSink.HandleRequest(HttpContext context) at System.Runtime.Remoting.Channels.Http.HttpRemoting Handler.InternalProcessRequest(HttpContext context)
If anyone has an idea ...
Thanks
Fred