We help IT Professionals succeed at work.

Any Known Issues with utilizing AppCmd.exe via SSIS to manage Web Sites? What are the best practices?

Are there any known issues with utilizing 'AppCmd.exe' via SSIS to manage Web Sites? What are the best practices? Is WMI safer/better? Can SSIS support functionality with WMI for operations other than 'read'?

Am I merely asking for trouble? The environment is Windows Server 2008, IIS 7 and SQL Server 2008 R2.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
1. I think WMI is better than AppCmd.exe.
2. WMI can be used with SSIS.
3. AppCmd.exe - A virus can replace / infect ...EXE - you must be protected.
4. If something happened in AppCmd.exe in what way SSIS will process it?
5. You can read about WMI best practices here:
6. WMI can support more than 'read'. For example, (WMI) IIsWebService supports:

Read more about this here:

Reza RadConsultant, Trainer

could you explain exactly what you trying to do?
maybe we find better solution then
Chaste SwedgePrincipal Architect/Developer



Hello to you reza_rad and thank you formand.

I haven't had time to research the WMI documentation, but I will shortly. In the list above formand, I do not see a command to add a virtual directory, which with AppCmd would be 'appcmd add vdir /app.name:string/ /path:string /physicalPath:string'. I would hope that this would be contained in WMI, but I have to check.

For you reza_rad, here is what I am thinking of doing:

1. FTP Data

 I have a vast array off HTML data and client/javascript in an FTP directory that is dumped each night. I've written several routines that figure out dates, titles, etc. of each of the directories, subdirectories and index HTML pages that are published to put into controls in .NET. Because the data at this FTP site is constantly changing, and because I do NOT want to have to publish 100's of mb of data whenever I move the application from DEV, to TEST, to STAGING and then to PROD, I was experimenting with creating a virtual directory to hold the pointer/reference to this FTP folder. Of course, since the contents of this directory changes each day, I must update the Virtual DIrectory to make sure that all new content is present.


2. Options

I see that I have one primary option, and please add as many others as you like. I could utilize SSIS to create the virtual directory at a given time each day/night immediately following the publish of the new data to the FTP site. Another option would be to create a separate website on the local IIS instance, and have THAT website point to the FTP directory. This would seem to be an easier path, but I suspect there would be issues when the content of the FTP directory changed each day. Also, this ties me to having the FTP site and the Web Site on the same machine, as when on different machines there are security issues with cross-domain/cross-machine browsing and linking the physical location of a local website to a foreign machine.

Any thoughts would be appreciated for either of you. Thanks!