简体   繁体   中英

IIS did not load the latest changes in Visual Studio 2015

When I run the project, The web page loads normally but when I tried to make changes to the CSHTML files, I press refresh, and the page did not load the changes. I have to stop IIS express and run it again to make the changes happen, which is very annoying and inefficient.

Microsoft visual studio 2015 Windows 7 32bit

edit: My temporary solution that I have discovered: Save (even without changes) the applicationhost.config file, then save file im working on (to reload the page automatically using browsersync)

First of all you need to understand how Caching works on IIS level: When any ASP or ASP.Net page is requested, "Page Output Caching" stores a response of a dynamic page in its memory. But when any subsequent requests arrive for those pages,instead of re-processing the page,server sends the cached response.

Please check this Link . It should help you

did you set the "compilation debug" to false in your web.config?

If yes, set the debug to true. You should set this debug to false when deploy the web app.

Please refer to the page below:

Why debug=false in ASP.NET applications in production environment

I also came across this issue in a previous version of Visual Studio. I noticed that my browser was caching the pages so I'm using ctrl+F5 when refreshing while debugging.

You can find more info on the difference between F5 and ctrl+F5 here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM