0

Let's consider a simple ASP .Net MVC project that is hosted on IIS. When I build project IIS still uses old code. Even if I clean the project, and make sure that bin folder is empty, - the site still returns a response. In order to use the latest code, I need to restart the application pool. Any ideas what is the reason?

Basil Kosovan
  • 888
  • 1
  • 7
  • 30

2 Answers2

0

I think the reason is the IIS Compression cache!

On the IIS console, click on the website and then on the Compression, and uncheck the Enable static content compression.

This should solve the problem.

OnePage
  • 116
  • 1
  • 13
0

You could try to disable the cache in iis by following below steps:

1)Open iis.

2)Select the site and click on the "HTTP response header feature".

3)Click on the set common header link from the action pane.

enter image description here

4)click the checkbox "expire web content" and select "immediately" radio button.

enter image description here

You could also set output caching in iis:

Configure IIS Output Caching

Note: after deploying site in iis you need to refresh the site so it can fetch the update.

Jalpa Panchal
  • 8,251
  • 1
  • 11
  • 26