Daily job triggering ASP.NET ASHX Handler?

I have a ASP.NET ASHX Handler that I need to be triggered daily and once weekly at a specified time.

How can I run this using a windows based job?

Many thanks.

What you can do is write a windows command line app, that does a simple WebClient or HttpWebRequest to the url, then schedule that app to run. That is if you have access to do this. There other ways to do it, but cannot quite remember now. I will post again if it comes to me

Look at wget if you just need a command line “GET this URL” app.

For our scheduled task needs, we do pretty much what nightstalker-DNS is talking about, with a dedicated client app talking to a dedicated handler on the server with some encryption and authentication.

I do the same as Nightstalker, as well. My program is a command-line program that takes the URL as it’s only parameter so I can use it for any site.

Additionally, I save the HTTP output of the call to a file so if something goes wrong, I’ve captured the error screen.

^^^Good point on error logging. We actually log the input/output to a database in the management app to make reporting a bit easier and more centralized.

Other question – how do you secure your services?

How I secure my services I use to combined methods.

  1. Required parameters of that page are username and password that gets sent from client app making the request.

  2. I make the service check the remote address and only allow traffic from specified IP(s) only.

While these 2 methods are not full proof, using them together definitely adds some level of protection. lol

Hope this will help you

How to run a URL automatically in Schedule Task
http://techgurulive.com/2008/12/19/how-to-run-automatically-a-url-in-schedule-task/

Why use firefox when you can use WGET? OR Powershell without a single 3rd party dependency?

Thanks very much guys, have been distracted from this thread but really appreciate your help. Has given me ideas on how to proceed!! :slight_smile: