Refresh System Environment Variables for IIS and Visual Studio

Environment variables can sometimes be a pain to deal with. Since environment variables are often cached or loaded only once, a change might not be immediately reflected in the application that we intend to apply them to.

 In my case, I need to debug our ASP.NET application and need the new environment variables. 

  • Restarting the Visual Studio itself was not enough. 
  • I tried to kill the worker process and that doesn't help either. 

At the end, I tried one thing that works which I got from a forum, i.e., enter the following command on command prompt or PowerShell run in admin mode:

iisreset

Comments

Popular posts from this blog

Sentinel One Strikes Again. No internet connection. Uninstall Sentinel One Agent.

A2 Hosting Let's Encrypt Can't Install Certificate on ASP.NET Core Application

NuGet Package Reference NU6105 Publish Error