.NET Framework Bookmark and Share   
 index > .NET Remoting and Runtime Serialization > How to avoid server crash when one of multiple clients is shut down?
 

How to avoid server crash when one of multiple clients is shut down?

.NET remoting is used in my current application, where a server and a couple of clients are involved. And the server stores a list of instances for all the remote clients. As long as a data base in the server is updated, then the server will access the list to fetch the instances, which invoke UpdateAccordingly() method on each client to achieve consistance.

The problem is that whenever one of the client is shutdown the server will also crash. What I expect is that the server can keep on interacting with other running clients in case of a client's crash.

So how to handle this problem?

frogprince.uia
To make it more clear, I would like to supplement some details. The connections between server and the clients are handled by seprate threads. So if one client is shut down, the connection is not available. Then an exception is thrown by a specific thread. It seems that the exception can not be caught by the main thread. So exception can not be handled to restore all the interactions, for instance, remove the the instance of the client, which is not available.

Thank you so much in advance.
frogprince.uia
Hi ,

In this scenario you need to handle the exception. If your application doesn't handle the exception in work thread, the unyhandled exception will close the host process in this scenario. Please reference the following page:
http://msdn.microsoft.com/en-us/library/ms228965.aspx

Best regards,
Riquel
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Riquel_Dong

You can use google to search for other answers

Custom Search

More Threads

• Serializing XML Attributes in Arrays
• SaveFileDialog with .NET Remoting
• Binary Serializing a DataSet
• Underlying Connection Closed-Remote server not repond-Unauthorized
• need help with event handler with remoting
• How to get a free port ?
• Serializing a complex object
• Remoting interferes with PlugNPlay messages?
• .NET Remoting - Getting Remote User Account?
• System.Web.Mail - How to fetch rejected recipient addresses from the InnerException?