Does It or Doesn' It Delete VDirs?

Topics: IIS and Web Services
Feb 2, 2010 at 8:17 PM
Edited Feb 2, 2010 at 8:22 PM

Tom,

    In an earlier you said "You would have to manually delete any old vdirs.  As I probably mentioned before, the Framework doesn't delete vdirs in case they were specially set up by a sysadmin or used by other things.  Someday that should be an override property in the .btdfproj.".

    Today I got a more-virgin machine of a co-worker, and was trying to iron out last minute peculiarities with the deploy/undeploy and VDirs.  My concern was that my machine had been played with so much, that it was not a pure enough environment to test on.   Also, we have QA testing happening on our QA system, so I cannot deploy there just anytime I want. 

    Today, I ran a deploy and undeploy on the co-workers machine, and low-and-behold, the undeploy DID delete the VDirs.  I have not been seeing this behavior on our QA system.   Here's the proof from the DeployResults.txt. 

Target UndeployVDirs:
                Virtual directory 'TFBIC.RCT.BizTalk.Orchestrations' deleted.
                Virtual directory 'TFBIC.RCT.BizTalk.Orchestrations_Proxy' deleted.

                "C:\Program Files (x86)\TFBIC.RCT.BizTalk\Deployment\Framework\DeployTools\cscript64.exe" /nologo "C:\Windows\system32\iisext.vbs" /RmFile "C:\Program Files (x86)\TFBIC.RCT.BizTalk\IISDirWCFPublishedOrchestrations\btshttpreceive.dll"
                Connecting to server ...Done.
                Deleting extension file complete.
            Target UndeployAppDefinition:


Did I read you wrong before then, or it really does try to and sometimes does delete the VDirs? Or other factors are involved? Or were you saying it's only when you do an undeploy in Visual Studio that it doesn't delete them? 

I actually would prefer that it did. As per the other long thread, my typical problem is that I redeploy and it tells me that the VDirs already exist.

The App-Pools it created are still there, but I think that's okay.

Thanks,

Neal Walters

 

 

 

Coordinator
Feb 2, 2010 at 9:41 PM

Sigh..  I handed out bad info!  Yes, the Framework DOES attempt to delete vdirs on undeploy for a server install only.  It will not stop executing the script if the delete fails.  The vdir deletes are handled through WMI, using a WMI root of IIS://localhost/w3svc/1/Root.  Starting at that location, the code looks for vdirs matching the names in the VDirList ItemGroup (or the vdirs text file).  Each matching vdir first has its application deleted recursively, and then the vdir itself is deleted.

AppPools can be created but are never deleted.

Tom