Posted on 22/02/2021 19:26:42
Hi Adrian,
I haven't used the Dynamicweb feature for this so I can only make some assumptions. For the site to be able to recycle the app pool, the app pool will need to run with administrator or SYSTEM permissions. That reduces the security since the sites will no longer be isolated from each other, and if there is a hack on the site, the hacker can own the whole server rather than just the site. So, it's not ideal to do that. But, if you understand the rights, the solution is to edit the IIS App Pool and set the Identity to local system. That should enable the feature to work.
There is another option that is better, if it works for you. That's to run a recycle on the AppDomain. That will cause an AppDomain (not App Pool) recycle, which will usually achieve the same goal. The nice thing about that is that you don't have to elevate to system/admin privileges. To do this, you'll need to write a frontend page for them to run, obviously behind a login.
To do so, you just need a simple page with the following Razor code:
@{
System.Web.HttpRuntime.UnloadAppDomain();
}
Scott