Remoting Exception : Requested service not found
I have application which hides itself after it is closed and places a icon in task tray. When you run the program it will check to see if its running and if it is then contact the application using remoting and tell it to show its self.
This seems to work fine, however, after a while it seems to loose the remoting server. The client application gets a RemotingException “Requested Service not found”. The server application is still running in the task tray.
On some googling I found that the connection dies after 5 mins. So I need to override InitializeLifetimeService or create a lease.
public override object InitializeLifetimeService()
{
return null; // return null to live forever
}
6 comments so far
Leave a reply
[...] Code Junkie Just another WordPress.com weblog « Remoting Exception : Requested service not found [...]
Requested Service not found
Requested Service not found
[...] * http://msdn2.microsoft.com/en-gb/library/2eb9bfae.aspx * http://codejunkie.wordpress.com/2006/03/05/remoting-exception-requested-service-not-found/ [...]
Be careful with setting InitializeLifetimeService ! By setting it to null you tell the GB not to clean it. Make sure you clean it by yourself (by calling Disconnect for example) otherwise you’ll get a memmory leak.
Cross check with your client and server config files, Tages are case sensitive. I have given below syntax for client and server file.
client configuration:
Server Configuration
You can find these files at given location.
http://www.csharphelp.com/archives2/archive460.html
or
http://www.i-caliber.com/services/view_thread.aspx?forumId=5&topicId=93&View=Yes