How to reduce the need for IISRESET to develop an ASP.NET web application in IIS 5.1

I have a web application project on my computer that is running WinXP and therefore IIS 5.1. The changes I make on this site only seem to β€œtake effect” after I make IISRESET. That is, I make a change to the source, rebuild the project, and then run without debugging (or using debugging). Recently modified code is not "visible" or is valid if I do not interfere with IISRESET.

BTW, the Internet tab on the Properties screen for the web application project is configured to use the local IIS web server in the Url project: http: // localhost / myVirtualDirectory

...

but I noticed the same problem when using VStudio Dev Server (i.e. I should stop it by visiting the tray area of ​​the taskbar to see that my changes took effect).

Can i change this?

EDIT UPDATE:

I just want to clarify this, if possible. Two answers diverge below; not sure how to move forward. One claims that this is to be expected (IIS 5.1 weakness, which in turn can provide better WinXP). Another argues that this is not the expected behavior (and I tend to agree that this is the first thing I found on the same old WinXP dev platform that I had a lot of time). I suspect it might be something "deep inside" the Visual Studio 2008 web application that has been updated to this new IDE from VStudio 2002 (ASP.NET 1.1). I tried to add a comment / questions on each answer path. Thank you

+4
source share
7 answers

This is not normal behavior at all. ASP.NET should automatically reload any assemblies that you place in the bin directory. If you use dynamic compilation, it should also pick up the new code in the codebehind files.

First, make sure you use the correct CodeFile or CodeBehind directive. CodeFile is designed for dynamic compilation.

If you have a web application project and compiling .cs source files into a DLL, make sure your project drops the DLL into the correct directory ... which is / [ApplicationRoot] / bin.

+4
source

This will not change it, but you can make an IISReset part of your post-build script.

+1
source

I have to say that this is not standard behavior. I have been developing in VS2005 for a long time, and I use XP, 2003 and later systems. But even on XP, I never had that.

Last year, two of my employees were still using XP to develop the web application we worked for. And we worked on the EXACT same code base that was distributed in the SVN repository. One of them is the same problem as yours, and we could not find a solution, and we just left it as it is. The other machine worked absolutely fine (both on identical equipment)

This is a sad story, because in the end his IIS became so confusing that he was forced to use the VS web server instead for a couple of months, until the system administrator agreed to reinstall Windows in his field :)

The moral of the story? I think your Windows / IIS installation is corrupted ... Try to get the latest updates from MS, and if nothing else helps, I would recommend doing a clean installation .. Sorry, but hope this helps ...

+1
source

You can check the registry key located here:

HKLM \ Software \ Microsoft \ ASP.NET \ FCNMode

If you see this registry key, make sure it is set to 0 or greater than 2. If it is set to 1, ASP.NET will not receive notification of a file change when you create it, and you will experience the exact symptoms that you are describing. Whenever you create a solution for web applications, the application should restart. If this does not happen, this may be the answer.

+1
source

The same symptoms, along with the constant increase in memory usage, once showed me that some controls that are not cleared due to the misuse of a single singleton. I would suggest doing some memory profiling for your application.

0
source

In the past, I have encountered similar problems. Any change to the web.config application will cause the application to restart correctly.

Just insert a blank line at the end and save it, and the web application will restart when the next page loads. For my purposes, I created a script that does this after each build. It sounds simple but always works.

0
source

Had the same problem and was able to find a weird answer.

Problem: When editing the source code, IIS does not want to update the editing.

In the settings of the Web project, I changed the servers to use Visual Studio Development Server instead of using the IIS web server.

Then I launched VS Development Server with F5 so that I can see the change after editing SourceCode. I left the setup, but then went to my home page using the IIS server. Now the changes are updated as they should.

So, when you leave IIS and tell it NOT to use in project settings. IIS extracts the new source code and displays the changes.

0
source

Source: https://habr.com/ru/post/1301606/


All Articles