ASP.net development server needs restart every time
I have a problem with my ASP.NET development server. I need to stop before I run my app from VS Express environment again otherwise it uses a previously rendered version.
I have searched for solutions all over, over a 3-4 month period but nothing, perha开发者_Python百科ps I am using the wrong words?
Do you save your changes in Visual Studio? (just editing is not enough)
Does your browser perhaps cache the page? In most browsers, CTRL-F5
will refresh to browser side cache.
Thanks to MSDN forums and microsoft knowledge base I found this KB http://support.microsoft.com/kb/911272
Essentially the HKLM\Software\Microsoft\ASP.NET\FCNMode determines how ASP.NET is dealt with as an app on the box setting this to "0" fixed the problem, no need to start and stop every time :)
Explains why a reinstall did not work
The issue may be that Cassini (the development web server associated with Visual Studio) doesn't restart if you change certain files, and does restart if you change others. For example, if you have an HttpModule in the App_Code folder, and you change its code, Cassini will not restart automatically. However, if you change web.config, then it will. Sometimes, doing a recompile on the site will fix it, but many times it won't.
I submitted a bug to Microsoft via Connect about this; their response was that the behavior was "as designed."
My solution was to switch to using IIS instead of Cassini -- just configure IIS to point to the development folder, and then change the startup URL to be http://localhost/ Cassini has a bunch of other annoying features too (like no support for compression), so this works better for me. I can still debug this way, too, so nothing lost.
Having said all of that, if you are only changing the .aspx page, then you may have something else going on....
I was having similar problems when I switched machines. Both machines had Visual Studio 2012 installed (The first one had Windows 7 Ultimate 64, the second one Windows 7 Enterprise N 64). On the second one I always had to restart the Asp.Net development server because the shadow assemblies in Asp.Net temporary files folder were never updated after the page has started.
I solved the issue by explicitly setting 'fcnMode' to default in Web.config:
<httpRuntime targetFramework="4.5" fcnMode="Default"/>
This worked well for me from Greg Slavec, I then went into the registration key to change the default there to the value "2". It moves with lightening speed on the login page, but during the Save routine it is still hanging..
精彩评论