Another user has already suggested impersonation. If it is good enough, you will go. As he said, however, there are some maintenance headaches to resolve and some security implications.
Some parameters that I used in the past that may or may not be applicable in your situation:
If the task is in a predictable schedule, just add it to the scheduled tasks in Windows, set the appropriate work account (administrator or something else) and release. I believe that there are also ways to programmatically launch a scheduled task, but I never had to do this. A Google search should catch you.
Implement the console application logic as a service running under the corresponding account. Then the service listens for a βtriggerβ from your web application β a file crash or something simpler.
In any case, the idea is to avoid storing any accounts on your ASP page and not grant these process rights that they do not need.
source share