Sometimes when deploying .NET code in IIS6 I can't rename or delete the .NET application folder because it's in use. The only thing that seems to fix it is stopping the w3svc service, doing what I need to do then starting it again.
This isn't ideal when there are other web applications being served on the web server. Just stopping that particular virtual web site doesn't seem to work either.
Is there a better way to do this?