Search code examples
visual-studio-2015iis-express

How to prevent IIS Express in visual studio from caching data from SQL server?


I am developing an asp.net MVC application in visual studio 2015. I change data in SQL Server Management studio, and refresh my webpage that get data from SQL server but changes does not apply in web page. When I close IIS express in system tray and restart my project changes of data will shown. It seems to IIS express cache data from sql server! How can I prevent IIS from this?


Solution

  • Any Answer?
    Ok, i found a way that cause IIS Express to Restart my website and in this way the cached data erased and my problem solved

    • in system tray RightClick on IIS Express and select Show All Applications
    • in the list of Running Applications click on your site name
    • click on link of applicationhost.config file to be opened in notepad(dont change its content!)
      enter image description here
      and now everytime that data cached you can just resave(Ctrl+S) the config file and reload your webpage.