简体   繁体   中英

Old IIS Site Cached after Publish VS2012

I am used to having IIS automatically reset a website any time any of it's "key" files change (such as the DLL's in the bin folder or changes to the web.config). As a result, any time I "publish" the website using VS2012 - the target IIS site (even if it's on another server) always restarts itself so that additional testing can be done.

A project I'm working on this week for some reason is not doing this. I can completely delete and republish the site - and yet IIS keeps serving up the "old" content until I recycle the associated AppPool. It reliably updates when I recycle the AppPool - and reliably does NOT update until I do so (seemingly regardless of which files are on the disk).

It's as though it's caching my entire ASP.NET 3.5 website. I have been working with IIS for almost 20 years, and I've never seen it behave anything like this.

Any suggestions/ideas?

This statement allows you to programmatically recycle the AppDomain (similar to recycling the whole AppPool, but involving only the current application so anything else is untouched)

HttpRuntime.UnloadAppDomain();

I usually #if(DEBUG) it in my projects so it doesn't make its way out of the dev environment.

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