AutoReload in IIS

Hey, welcome to the forums.
Take a look at my post from a while ago.

I did exactly that (with the filewatchers) .
On my end though, I separated my files so I load all the pages from a pages folder and endpoints from a endpoints folders (Basically New-UDPage or New-UDEndpoint is returned for each file)

This allowed me in turn to use filewatchers that will either triggers the Update-Dashboard cmdlet, reloading the whole dashboard in a fast manner or restart IIS pool associated to my dashboard.

You don’t want to restart the app pool whenever possible but when working with endpoints, if you simply run Update-UDDashboard, then the pages are refreshed but changes in the endpoints are not detected, hence why I used a combination of both.

I now use that everyday in my scaffolding module (WIP) DudDashboard - thread here

Except I did go further and added a button directly in my debug pages who triggers the filewatcher.
Normally, that would be a problem as anything which is run would also die when the app pool process is restarted, except that with an additional trick — see this — you can actually persist the process by creating it not as a child process (default behavior) but as an independant process.

1 Like