Accessing service from .NET web page

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have a .NET service I wrote running on my web server. I'd like to be able
to make infrequent calls from my my web application to this service. For
example, my service does some work every 30 minutes. I'd like my secure web
page (hosted on the same server) to tell it to "go do your thing right now"
because I can't wait 30 minutes.

I'm assuming that this requires either:

1. Remoting of some form.
2. ASPNET account to have enough rights to call a service on the same
machine.

I'd like to stick to option 1... but that's only because remoting sounds
fun. I need to learn the basics of remoting sometime. :) But, feel free
to talk me out of it.

So, what I'm looking for is a brief summary of how this should be done.

Thanks in advance.

Mark
 
I've being thinking about the same thing, and like yourself, don't really
know any remote way of doing this.

One method we came up with that we're investigating further is to have the
service listen to some port for a certian message. The web server can simply
initiate the service by posting this message at the port being listened to.

This then extends to many possible (but seemingly messy) ideas, i.e. given
the aspnet account write access to a folder, and have the service poll every
x seconds for a certain file. When it's found, it is initiated...

Other ideas anyone?
 
You ideally want as little interaction from the service as possible on your
web server, so it can concentrate on http traffic - however, there is an
exanple of this.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT15.asp

Not how I would do this - I would put a db on the server that could control
the service via a DB pool, and set the values with asp.net in the same DB.
Infinitely simpler to develop and enhance.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
Back
Top