I am trying to get an ASP.NET application to start automatically whenever the application pool is started.
In accordance with lots and lots of links online, I have already done the following:
- Set the application pool to
StartMode=AlwaysRunning - Set the site of interest (which belongs to the considered pool) to
preloadEnabled=true - Install
Application InitializationWindows Setup - Add
<applicationInitialization>node to web.config <system.webServer>node
The web application is based on Owin and has an easy way to log log4net into it Startup.Configuration(). Now when IIS restarts, I see that the w3svc.exe process is running, so I know what works StartMode=AlwaysRunning. However, messages are not logged in the log file.
Going to any URL (even non-existent) in the application will launch the application and add a log line.
Due to the real work being done when the application starts, I really want the application to really load, but I seem to be unable to do this.
Search on this site, unfortunately, I could not find a solution.
Thanks in advance.
source
share