views:

56

answers:

2

My ASP.NET MVC web app has a weird issue. In VS debugging mode it works as expected, but when I publish it to dedicated web server (windows 2003, IIS6) a sql query returns previous data even though underlying data was already updated through the same connection. It looks like as if a query returns cached data. What might be the problem?

A: 

you might need a commit

Randy
+1  A: 

Are you sure the query is being called again? Perhaps the web request is being cached by your browser and not even re-requested to the web server? You may need to set the HttpCacheability on the page that the query occurs to ensure caching is not occuring.

To test this, you can tell IE to re-download every time via Tools..Internet Options..Browsing History..Settings.."Every time I visit the webpage" in order to quickly see if caching is the issue.

David
Thank you. Changing IE history settings helped to solve the problem. Likely I need to set HttpCacheability in code.
synergetic