How to install console app on IIS

Coreysan 1,696 Reputation points
2024-08-14T03:40:51.27+00:00

I wrote a console app using Visual Studio 2019, Windows 10, with no args. As a standalone, it works great with Task scheduler for daily processing.

However, my boss then says we need it running on an intranet IIS server. How can this type of thing be done on IIS?

I can write a windows service, or even classic ASP.NET. But it needs to be on a schedule. What technique would be best?

Internet Information Services
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. MotoX80 33,481 Reputation points
    2024-08-14T14:45:13.7033333+00:00

    Maybe your boss just wants you to write a page that displays the output from the last execution of that program to a user. Or maybe it's just a misunderstanding and all he wants you to do is to define the scheduled task on the server that hosts your web sites.

    From a technical perspective, it should be fairly simple to write an .ASPX page that runs a command line program, captures stdout/stderr and formats it's output to display in a web browser. You would need to define the security requirements as to what users are authorized to launch that page. And you would need to define what the output that is displayed to the user should look like. (Tables, graphics, colors.)

    To run a web page on a schedule, you could write a Powershell script that issues an Invoke-WebRequest via the task scheduler. That only makes sense when a web page is the ONLY way to initiate some business processing.

    You should go back to your boss and get some clarification on the processing requirements. Maybe show him this reply.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.