简体   繁体   中英

How do I prevent my ASP.NET application from constantly restarting in my development environment?

I'm using Visual Studio 2010 and working on an ASP.NET 4.0 web application. At the moment, a co-worker and I are tweaking CSS, which means constantly changing and saving CSS files and then refreshing the running page in a web browser.

Every few saves, the application restarts, causing a considerable delay while we wait for the app to start up, log in again, and return to the page we were working on. In an IIS production environment a CSS file wouldn't go through the ASP.NET ISAPI, but apparently when running with VS2010 and the developent web server this doesn't matter... or something.

Is there any way to prevent this from happening? Thanks!

Instead of using the built in web server in Visual Studio (casinni), you can install IIS on your workstation and specify visual studio to use IIS as the development web server that runs your project. I do this for the same reasons. The Casinni server crashes or fails to start pretty regularly for me.

You could also use IIS7 Express. Not only will the server be faster but it will also be more like your production environment. This should help you iron out any issues before you deploy. Its also not hard to get VS to debug a local IIS instance.

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