[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"/2025/10/28-refresh-system-environment-variables-for-iis-and-visual-studio":3},{"id":4,"title":5,"body":6,"date":58,"description":54,"extension":59,"meta":60,"navigation":61,"path":62,"robots":63,"seo":64,"stem":65,"__hash__":66},"posts/2025/10/28 refresh-system-environment-variables-for-IIS-and-Visual-Studio.md","28 Refresh System Environment Variables For IIS And Visual Studio",{"type":7,"value":8,"toc":55},"minimark",[9,18,25,28,31,33,36,38,41],[10,11,13],"post-title",{":date":12},"date",[14,15,17],"h1",{"id":16},"refresh-system-environment-variables-for-iis-and-visual-studio","Refresh System Environment Variables for IIS and Visual Studio",[19,20,21],"notes",{},[22,23,24],"p",{},"This is a repost from my old blog. First posted in 8/7/2019.",[26,27],"br",{},[22,29,30],{},"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.",[26,32],{},[22,34,35],{},"In my case, I need to debug our ASP.NET application and need the new environment variables.",[26,37],{},[22,39,40],{},"Restarting the Visual Studio itself was not enough.\nI tried to kill the worker process and that doesn't help either.\nAt 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:",[42,43,44],"code-block",{},[45,46,51],"pre",{"className":47,"code":49,"language":50},[48],"language-text","iisreset\n","text",[52,53,49],"code",{"__ignoreMap":54},"",{"title":54,"searchDepth":56,"depth":56,"links":57},2,[],"2025-10-28T00:00:00.000Z","md",{},true,"/2025/10/28-refresh-system-environment-variables-for-iis-and-visual-studio",null,{"title":5,"description":54},"2025/10/28 refresh-system-environment-variables-for-IIS-and-Visual-Studio","Uuu80znnHoKbvK8klSjwd96je4dWsyRMP-BHrylJJFY",1785167452742]