One of the great features of .Net when it first released was Xcopy deployment. No more .dll registrations, just copy the files to the web server. While this was a great feature for Microsoft developers, new problems emerged, specifically around managing web.config. Sections like connection strings and custom errors need to be managed between environments, which meant many copies of the files or scripts to change them. Other necessary steps, like managing permissions and IIS configuration were still outside the Xcopy process. A recent tool, MSDeploy, is now integrated into Visual Studio 2010 and makes managing these issues easier. Besides web.config, MSDeploy also manages file deployments and synchronization, ACLs, and IIS settings. If your deployments have multiple steps, need ReadMe files, or can’t be done by someone outside your team, you need to learn MSDeploy!
10. MSDeploy Process IIS VS 2010 Command-line PowerShell IIS Package File MSDeploy Create the Package MSDeploy
11. Deployment Using IIS Manager UI Using command file created by Visual Studio 10 Using command line using MSDeploy.exe Using Power Shell support provided by MS Deploy Using managed APIs provided by MS Deploy
appHostConfig IIS 7 configurationappHostSchema IIS 7 configuration schemaappPoolConfig IIS 7 Application PoolarchiveDir Archive directoryauto Automatic destinationcert CertificatecomObject32 32-bit COM objectcomObject64 64-bit COM objectcontentPath File System ContentcreateApp Defines an application in the IIS configuration system.dbFullSql Deploy SQL databasedbMySql Deploy MySql databasedirPath DirectoryfcgiExtConfig FcgiExt.ini settings or fastCgi section configurationfilePath FilegacAssembly GAC assemblyiisApp Web ApplicationmachineConfig32 NET 32-bit machine configurationmachineConfig64 NET 64-bit machine configurationmanifest Custom manifest filemetaKeyMetabase keypackage .zip file packagerecycleApp Recycles, starts, or stops an application's app pool, or unloads an application's app domains on IIS 7. regKey Registry keyregValue Registry valuerootWebConfig32 NET 32-bit root Web configurationrootWebConfig64 NET 64-bit root Web configurationrunCommand Runs a command on the destination when sync is called.setAcl Grant permissionsurlScanConfig UrlScan.ini settings or request Filtering section configurationwebServerFull IIS 7 Web serverwebServer60 Full IIS 6 Web server
When adding the Web Server (IIS) role, be sure to install Management Service.In the Services snap-in, find the Web Management Service and set its startup to Automatic (it’s manual by default). Don’t start it yet. Open the Internet Information Services Manager, and select the server. Open the Management Service feature. Check Enable Remote Connections. Choose a port (or keep the default), IP, Certificate, choose any restrictions you might require. In the Actions part of the right pane, click Apply. Click the Start link in the right pane.