views:

590

answers:

2

I am working on a new licensing system for our companies software. We are using DeployLX for out licensing and generally speaking, it meets our needs. One of the options that we want to provide is a Concurrent License where the client can install our software on a server and the user uses our products via a RDP connection. If they have purchased 10 licenses we will allow for 10 instances of our software to be run (on the server)

We have created a Concurrent Monitor in C# to control the license and this works fine if we only need to run our software off 1 server. However, a number of our clients use load balancing in a server farm configurations, so we need we need to install the Configuration Monitor on one server and our software on all the other servers. These servers will need to connect to this one server to contact the Concurrent Monitor and validate the license (which is held against the Concurrent Monitor, not our software).


Questions:

Currently the Concurrent Monitor is a Windows service installed on a server (server 1). So, how would I code the contact to a method in the Concurrent Monitor from our software product on the other servers (say server 2 and 3)?

I have tried to use the .NET ServiceController and although I can connect to the Windows service, I do not know how (or even if I can) call a method I have written in the service?

+1  A: 

I am not sure about if you can call a method in the service. However, you can achieve the above objective in alternative ways.

i. Let each server write to a standard location the number of connections it is handling. The Concurrent Monitor needs to read this value.

ii.Implement the service as a remoting client, so that the Concurrent Monitor can call this function.

iii. Make the service call to Concurrent Monitor to update the number of connections when ever it changes.

You may choose of this or alternate approaches depending on what easily fits in.

rAm
Thanks rAm. We have thought about this and it looks like it could answer our needs but as I said to Preet below, I was hoping that we could call a method in a Windows service to save us some time.
Skittles
I know how it is with deadlines looming. Do let us know what works at the end of it all.
rAm
Will do. Thanks rAm.. I am in the process of writing a WCF service to expose the method.. I also have an email in with a Citrix admin to see if he can recommend the best approach.. I'll keep you updated and thanks for the help. I really appreciate it.
Skittles
+1  A: 

You would be far better to expose the method via a WCF or .net remoting (I'd favour the earlier)

Preet Sangha
Thanks Preet. I was thinking the same myself but I don't have much WCF experience and as we are coming close to release date, I was hoping that I could cut a few corners.
Skittles