A fellow blogger mentioned that my article on creating/destroying IIS virtual directories programmatically is lacking some information. Here is a quick update based on that feedback.
- I don't know why the images in the image gallery are broken yet the images in the article work. I am looking into that.
- I think the names of the controls are pretty self-explantory with one exception and that is the FolderBrowserDialog contol on the frmWebSetup form. The control instance is called “ofdBrowse“, apparently because I originally planned it to be an OpenFileDialog. Here is a summary of the control names.
- frmWebSetup
- lblVirtDirName & txtVirtDirName are the “Virtual Directory Name“ controls at the top of the Web Setup form.
- lblVirtDirAlias & txtVirtDirAlias are the “Virtual Directory Alias“ controls in the middle of the Web Setup form.
- lblVirtDirPath & txtVirtDirPath are the “Virtual Directory Path“ controls at the bottom of the Web Setup form.
- chkAccessRead & chkAccessScript are the checkbox controls at the right of the Web Setup form.
- btnCreateVirtDir, btnCancel, & btnBrowse are the command buttons on the Web Setup form.
- frmWebTeardown
- lblVirtDirName & txtVirtDirName are the controls at the top of the Web Teardown form used to indicate the virtual directory being removed.
- btnCancel & btnDestroyVirtDir are the command buttons on the Web Teardown form.
- There is some question about the use of Option Strict in the MainMod module. Essentially, here are the changes that should be made to that code (note that the article is updated):
- In the “ProcessCommandLine” function, for each of the lines “For i As Short”, change them to read “For i As Integer”.
- In the “ProcessCommandLine” function, when dimensioning the Hashtable, cast the size to an integer. For example, change the line to ret = New Hashtable (CInt (cmdargs.Length / 2I))
That should about do it. Thanks for the feedback! And good luck to those of you using it!