Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any issues running a daemon via XSP2?

We want to run a daemon that exposes itself via ASMX, using Mono 2.0 (or later). Instead of dealing with the ASP.NET hosting APIs, we're thinking about just starting a daemon thread in the Application_Start event. XSP2 shouldn't restart the appdomain, so our daemon will be safe.

Are there any downsides to this (besides being a bit odd)? Any other approaches that allow us to have our code running in the same appdomain as the ASMX requests?

like image 851
MichaelGG Avatar asked Nov 14 '22 16:11

MichaelGG


1 Answers

Why do need XSP to run a daemon through calling an ASXM when you can just build a shell console application (with the same code or accepting arguments)? That can be called in terminal or called from any shell script and added to cron. Simple no server required to do this.

If you want to do this, not the way I would do it, you can setup a basic server instance (using nginx, lighty or apache) listing in a certain internal port, add that server to a dummy host and on cron/shell script you can do

WGET http://dummyhost/mydaemon.asmx
like image 188
Rui Marques Avatar answered Dec 10 '22 19:12

Rui Marques