Recently its come to my attention that this occasionally this dialog will pop up if multiple appservers are launched. My preference would be to log this and close the the app that tried to open. Please advise the best way to handle this.
You need to override property IsCheckForOtherInstancesRequired of the application server class:
class AppServer : ApplicationServer
{
public AppServer()
: base("ServerName")
{
}
protected override bool IsCheckForOtherInstancesRequired
{
get
{
return false;
}
}
}
This change will disable the built-in multiple instance check.
If you still need to check for multiple instances then you’ll need to implement the check code by yourself.
You can use code of the DetectOtherInstances the method from the ApplicationServer class as a sample.
The override works perfectly. But I am unable to locate the “DetectOtherInstances the method from the ApplicationServer class”. Here is what I see in my ApplicationServer class.
using System;
using System.Security.Cryptography.X509Certificates;
using System.ServiceProcess;
using System.Windows.Forms;
namespace RemObjects.SDK.Server
{
public class ApplicationServer
{
public ApplicationServer(string applicationName, params Type serviceTypes);
public ApplicationServer(string applicationName, string rodlNamespace, params Type serviceTypes);
public ApplicationServer(string applicationName, string rodlNamespace, string serviceName, string serviceDescription, params Type serviceTypes);
protected ApplicationServer();