Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm sure of come across situations where stopping IIS using the IIS manager has not allowed me access to asp.net bin directory files that are in use but when stopping the World Wide Web Publishing service, the files are then accessible.

The question was asked, are they not doing the same thing? Can anyone confirm that they are the same thing...I've always thought they were two different things...

I'm specifically talking about IIS6 on Windows Server 2003 (in case it's changed in different server or IIS versions)

thanks heaps!

share|improve this question
1  
Hmm, when you restart "IIS", how do you do it? Right-clicking the website and choosing "Stop", or right-clicking on the server and choosing "Restart IIS"? –  Mark Henderson Jan 28 '10 at 3:30
    
typically when just restarting within IIS, I stop the Application pool being used, then restart the website and then start the Application Pool. For locked files or replacing the bin directory, i generally use services.msc to stop the WWW Publlishing service –  davidsleeps Jan 28 '10 at 3:50
add comment

3 Answers

up vote 1 down vote accepted

This artical here might help.

When you right-click on the server in the IIS manager and choose "Restart IIS", it executes iisreset. Running iisreset does NOT reset the HTTP stack, it simply unloads and reloads the IIS process.

As a result, believe that iisreset does not reset the W3C service.

share|improve this answer
add comment

Stopping or restarting IIS just flushes the IIS process from memory, and stops the listen. It doesn't actually restart the W3C service, so the service can keep files locked.

share|improve this answer
    
When stopping the IISAdmin service it warns that it's also going to stop the WWW service and then, in fact stops it. Am I missing something? –  joeqwerty Jan 28 '10 at 3:51
    
Restarting the IISAdmin service is again different than running IISReset from the command line. –  mrdenny Jan 28 '10 at 3:57
    
Right, misunderstood it in his post that he was stopping it in IIS Manager. Carry on. ;) –  joeqwerty Jan 28 '10 at 4:02
add comment

I'm confused. I don't see an option to stop IIS in IIS Manager, only an option to restart it. Do you mean that you're stopping the web site in IIS Manager? If that's what you mean then I think I have an answer:

I'm guessing that your web site is running in "isolated" mode (IIS 5 term) so it's running in it's own application pool, which spawns a separate w3wp.exe process for the application pool. Stopping the web site does not stop or kill the application pool, therefore your files are still in use and can't be accessed. Conversely, stopping the WWW service stops both the web site and the application pool, killing the w3wp.exe process and therefore releasing the in-use files.

share|improve this answer
    
sorry for the confusion. in a comment to the question, I answered the method I usually use which is to first stop the application pool... –  davidsleeps Jan 28 '10 at 4:39
    
Thanks for clarifiying it for me. When you stop the application pool and then stop the web site, is there any chance that the application pool is restarting before the web site stops? Any access to the web site before it's stopped will restart the application pool so maybe it's a timing issue. Try stopping the web site first and then the application pool and see if that helps. –  joeqwerty Jan 28 '10 at 5:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.