App Host Console ASPX Page?

In Framework 4.0, I have a small console application. I have a standalone .aspx page (no codebehind) and you want to run a console application to host this page. I searched for tricks using System.ServiceModel.Web or System.Web.Services trying to find a way to do this.

Can someone help me understand?

Thanks.

+4
source share
2 answers

Have you seen this article ? It is not written for asp.net 4.0, it is written for asp.net 2.0, but I do not think there is a big difference.

+3
source

The easiest way to host ASP.NET on a simple web server is to use the Cassini web server, which can be downloaded from MS, including the source code. The following two links help:

After downloading, you need to do the following:

  • Comment out lines 92 through 96 of the .cs request so that Cassini does not drop requests coming from hosts other than localhost.
  • Run the assembly that creates and installs the Cassini library in the GAC.
  • Start the server.

Note Cassini is a console application that simply displays a form. If you are interested in making it work exclusively as a console application, refactoring and deleting a form. It should not be difficult.

+2
source

All Articles