tags:

views:

228

answers:

1

Hi. I'm write installer for my web site. Installer creating application pool, virtual directory and assign virtual directory to application pool using this instruction. All work, but... If i reset IIS immediately after install my program, my application pool deleted, but if i open if open my web site in web browser and then reset IIS, application pool not deleted. Why this happens?

I'm using IIS 6.0 (windows server 2003), C# 3.0 and windows installer

P.S. sorry for my english

+2  A: 

There is a slight delay in application pool registration. If you open your website it forces that operation to complete. If you don't, and you reset before it completes, then it's gone.

Are you calling iisreset /nowait? This will cause it to abandon that registration, calling just iisreset should let it finish.

Try iisreset /noforce to be safe with this, it'll wait until IIS finishes, and if it times out waiting, won't forcefully kill anything. If it takes a long time, give it a timeout that's higher, the default is 60 seconds. You can do this via: iisreset /noforce /timeout:300 to give it 5 minutes of slack.

Nick Craver
I reset using Computer management window, in context menu I choose All Tasks -> Restart IIS.>>There is a slight delay in application pool registrationhow many time?
Sergey
reseting with iisreset /noforce not deleting pool, thank you
Sergey
I'd been going crazy with this issue, this helped a ton!
MasterMax1313