Check if Remoting server is running?
-
I have two apps on the same machine, one has to check and see if the other's Remoting server is running, beofore it tries to connect. If it's not running, then the (client) app should launch the other app, and wait for it to finish loading, and then try again to connect. Two questions: 1. How do I check to see if it's running or not? I can just try and catch an exception but I'm wondering if there's a better way. 2. How do you recommend I wait until it starts (with a timeout so I don't wait forever)? thank you "Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read." -Groucho Marx
-
I have two apps on the same machine, one has to check and see if the other's Remoting server is running, beofore it tries to connect. If it's not running, then the (client) app should launch the other app, and wait for it to finish loading, and then try again to connect. Two questions: 1. How do I check to see if it's running or not? I can just try and catch an exception but I'm wondering if there's a better way. 2. How do you recommend I wait until it starts (with a timeout so I don't wait forever)? thank you "Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read." -Groucho Marx
If it's hosted as a service use a service controller component... However, what you are trying to do implies that the server is always on the client - why use remoting? :confused: "Enterprise Solution Patterns using Microsoft .NET" says that remoting calls can be at least 1000 times slower than a local call in the CLR. Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript) tatham@e-oddie.com +61 414 275 989
-
If it's hosted as a service use a service controller component... However, what you are trying to do implies that the server is always on the client - why use remoting? :confused: "Enterprise Solution Patterns using Microsoft .NET" says that remoting calls can be at least 1000 times slower than a local call in the CLR. Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript) tatham@e-oddie.com +61 414 275 989
Tathan thanks for your response, I am using remoting to communicate between my BHO and a C# application. The BHO's are loaded by each instance of Internet Explorer, each seperate from one another, and relay information to the application. The nature of a BHO is that it runs in the same process as the IE instance, and therefore isn't in the same CLR as the application (each BHO is in it's own CLR instance). I looked at the ServiceController class, but it seems to be for the purposes of starting and stoppig a windows service. I don't have any services- it's all apps (well and BHO's). (Also btw, a service could be running but have it's remoting server turned off...) Am I missing something? thanks bog "Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read." -Groucho Marx