TacticalMin
TacticalMin

Reputation: 811

Determine if http request is coming from a scheduled task or a browser (ASP)

I am building a Intranet application using ASP/C# to perform a specific job. However I have two requirements

  1. I would like to be able to call the webpage from a browser and have a form to allow the user to run the service manually.

  2. However I also need a scheduled task to be ran twice a day that calls the webpage and runs the service automatically 'onvisit' (without the need for a form submission)

I could easily meet requirement 1 OR 2. But I want to meet both conditions.

Note: We cannot create a separate .EXE file that runs the needed code.Also, only as a final choice would I want to make two separate webpages.

Upvotes: 1

Views: 103

Answers (1)

GLlompart
GLlompart

Reputation: 271

Parametrize the service and put the params in the querystring so when you call it from the exe it behave as expected.

Upvotes: 2

Related Questions