Wednesday, November 08, 2006

HOWTO - Update Applications under Debug on IIS 6

Question:

Hi,

we are using a IIS 6.0 server as remote webserver for developing vstudio .NET applications. When debugging we always have to restart IIS (or recycle application pool), in order to overwrite the new compiled DLLs.

The DLL is locked by the w3wp.dll process and the dll therefore cannot be overwritten.

Is there any way to tell IIS (w3wp.dll) not the cache the dll or better free the dll directly after execution?

Answer:

Standard debugging procedures differ depending on the type of application.

ISAPI Extension DLL

You can uncheck the "Cache application files" option under the "App Mappings" tab of the application to force IIS to load/unload the ISAPI Extension DLL for every single request to that resource extension's handler. Be warned that this option is debug-only (do NOT uncheck this on production servers) and often exposes startup/shutdown bugs in your ISAPI Extension DLL.

ISAPI Filter DLL

You should simply recycle the Application Pool(s) which have loaded the Filter DLL. If it is a Global Filter, then you must recycle all Application Pools. If it is a Site Filter, then you must recycle all Application Pools used by applications of the Website which loads that Site Filter.

ASP.Net httpModule and httpHandler

You can dynamically change either the DLL in /bin or source code in global.asax or /App_Code, depending on how you configured the httpModule or httpHandler. No restart/recycle required.

//David

11 comments:

Anonymous said...

You can also debug filters using the ISAPI Filter debugging host at http://www.eggcentric.com

David Wang said...

Thanks for the tip.

However, can you clarify why one would want to debug ISAPI Filter using a debugging host? What do I get from such a host? How am I sure that I'm debugging a real issue vs a simulated issue from the debugging host?

Because using freely available and downloadable tools from microsoft.com, I can do just about everything I need to debug ISAPI Filters, given a test IIS server.

//David

Jorge said...

ISAPI Debugging host from www.eggcentric.com is an excelent option. I'm using it for years debugging IIS 6 without having to restart the server.
It's very easy:
- Configure the web site to load the eggcentric isapi filter
- From the RAD IDE (VS, Delphi) open the provided application using the .dll as parameter.

Thanks it! Everytime Internet Explorer retrives information from the website, the filter passes the request to the application, and then to the RAD debugger. Very easy and effective. It's worth the price.

Anonymous said...

Now do you worried about that in the game do not had enough 2moons dil to play the game, now you can not worried, my friend told me a website, in here you can buy a lot 2moons gold and only spend a little money, do not hesitate, it was really, in here we had much 2moon dil, we can sure that you will get the cheap 2moons gold, quick to come here to buy 2moons dil.

Now do you worried about that in the game do not had enough 9Dragons gold to play the game, now you can not worried, my friend told me a website, in here you can buy a lot 9 Dragons gold and only spend a little money, do not hesitate, it was really, in here we had much 9Dragons money, we can sure that you will get the cheap 9Dragons gold, quick to come here to buy 9 Dragons gold.

Adi said...

Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.

Anonymous said...

vuitton replica
which are with handles should not be afraid on a angle of the wardrobe, autumn the louis replica
for a absolute continued time would be bigger off in a bolt louis vuitton replica
rather than a box.

longge said...

The Bentley GT collection owes its name from the original location of the Navitimer World factory. It was on this site that the 'return-to-zero' movement and the circular slide-rule Breitling Avenger were first designed and manufactured. To commemorate, these Superocean are little more ornate; hands and hour markers are embellished in gold.

If you are one of the fortunate who can go out and buy a Coach Outlet , my hat goes off to you. Do me a favor though, when you are carrying your beautiful Coach Hamptons , make sure you hold your head up high and smile because you are special and you deserve the best out of life. And Coach Madison doesn't get much better than Coach Legacy .


If you duplicate a THE COSBY SHOW and then lend to a friend or family member, this is a clear infraction of the fair use policy. By ignoring this policy and the copyright laws, you are putting yourself at risk of facing prosecution for the THE COSBY SHOW DVD Duplication. The best advice anyone can give you is to ensure that any THE COSBY SHOW DVD COLLECTION duplicates you create are in a safe and inaccessible place for any visitors you have.

fgdg said...

The consequences of today are determined by the actions of the past scarlet blade gold. To change your future, alter your decisions today scarlet blade gold, Experience is a hard teacher because she gives the test first, the lesson afterwards scarlet blade gold, but it takes character to keep you there.

fgdg said...

You laugh at me for being different, but I laugh at you for being the same LOTRO Gold, the consequences of today are determined by the actions of the past Lord Of The Rings Gold, to change your future,LOTRO Gold alter your decisions today.

fgdg said...

I have a simple philosophy: Fill what's empty. Empty what's full. Scratch where it itches RS GP, Don't go around saying the world owes you a living. The world owes you nothing. It was here first RuneScape Gold, Being happy doesn't mean that everything is perfect. It means that rs gold you've decided to look beyond the imperfections.

fgdg said...

Pray for powers equal to your tasks.Then the doing of work shall be no miracle, but you shall be the miracleRunescape Gold, Fear not that the life shall come to an end, but rather fear that it shall never have a beginning rs gold, At twenty years of age, the will reigns; Runescape Gold at thirty, the wit; and at forty, the judgment. What gets us into trouble is not what we don't know.It's what we know for sure that just ain't so.