I have a windows service application which works using remoting. It is used to display baloon tip. However, it sometimes throws this error:
Exception :Requested Service not found
Inner Exception : Stack Trace : Server stack trace: at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Baloontip.clsBaloonTool.Messagebox(String Message)
Can any body please help me with this issue.
If the error occurs after some time, it is possible that you doesn´t override the InitializeLifetimeService
method of the base class MarshalByRefObject.
By default, if you doesn´t override the method, the remote object is destroyed after some time (I think 5 minutes). If you override the method and return null, the object has an endless life time.
public override object InitializeLifetimeService() {
return null;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With