1

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)

3 Answers3

0

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

Anand Shah
  • 366
  • 1
  • 4
  • 18
0

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

Hong Yi
  • 74
  • 7
0

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

Community
  • 1
  • 1
DieterC
  • 81
  • 5