Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 7 Jahren, 4 Monaten
Letzter Beitrag:
vor 7 Jahren, 4 Monaten
Beteiligte Autoren:
Michael Q, Fabrice Harari

WD15: How to host my app's license generator?

Startbeitrag von Michael Q am 01.04.2011 08:57

My new app is ready to be sold and I have built a separate license generator in Windev based on Fabrice's licensing code. This is intended to receive user info from my payment processor, generate a license key, store the details in an HFDB, email the license key to the licensee, and return a result to the payment processor. This has raised lots of questions:

How should I host this license generator?

I want to use a normal hosting company. What kind of hosting plan would I need?

The generator must automatically restart if the hosting server goes down and restarts. Do I need to build this as a Windows service? Would a hosting company allow this to be run?

Presumably I would make this work as a web service or something? Would it be safe or possible to host this on the same account as my Drupal website?

How do you guys normally do this?

Sorry for being an ignoramus, but I've never done this before.



Hi Michael

if it's a windev program, then a regular hosting contract probably wont work, as hosting companies generally do not agree to have customer programs run on their machine (only web site or DB, most of the time)

So you can either :
- rent a dedicated server under windows (starts around 25 $/month)
- transform your windev program in a webdev one and use a webdev hosting company like kalanda (starts at 5e/month AFAIK)
- use one of your own machine: if you have a fixed IP, it's just a question of opening ports on your firewall, if you don't, you can use dyndns (or equivalent) to 'fake' it

Best regards

von Fabrice Harari - am 04.04.2011 09:45
Hi Fabrice, thanks for your reply.

I don't have Webdev or an always-on computer with a fixed IP, so I guess I would need to use a dedicated server.

1. Should I write my license generator/manager as a windows service so that it will automatically restart if the server goes down? Are there any issues to look out for with this?

2. How should i get data into and out of my license generator/manager? Should this be done as a web service? Do I need to have Webdev to do this? If I don't have Webdev, how would you suggest that I do it?


von Michael Q - am 04.04.2011 09:56
Hi Michael

you can create a web service with windev and there are examples of server and client side in the windev examples, AFAIK, so you could find everything you need this way

Another solution would be to use webdev, migrate your licensing code as a webdev project, and use an awp page as the connection from your regular windev applications (using an httprequest)

The main advantage of the second solution is that the httprequest will use port 80, and this port is always open to allow web browsing. With a web service( soap), the port may be blocked by some firewalls

Best regards

von Fabrice Harari - am 04.04.2011 17:40

Should I write the license generator/manager as a windows service so that it will automatically restart if the server goes down? Are there any issues to look out for with this?

Or can I write it as a normal exe and have it auto-restart some other way?


von Michael Q - am 05.04.2011 14:30
Hi Michael

it's really up to you

a service may be more complex, as permissions are not the same and may interfere with data access...

You can of course use a regular windev program and set it in the "RUN" part of the registry to have it start with the system

But both solutions can work

Best regards

von Fabrice Harari - am 05.04.2011 16:03
Thanks Fabrice.


von Michael Q - am 05.04.2011 16:06
So how can I send to and return values from my license generator executable? In other words do I need to restart the exe each time like this: MyApp.exe param1 param2 ?
Isn't this going to be a bit slow (although no windows need to be opened)?

Or can MyApp.exe be already running on my server and somehow listen out for parameters sent to it? How would I do this?



von Michael Q - am 08.04.2011 13:12
Hi Michael

either you have your pgroam run as a service or run normally, started with windows... at that point, your program should ALWAYS be in memory (no restart) and LISTEN on a port (soap system by example)

In both case, it should be started once and never been closed

From the top of my head, there is a soap client+server example available in the windev examples. You should look at them.

Best regards

von Fabrice Harari - am 08.04.2011 13:41
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.