Steps for setting up a new MVC/WCF Deployment on IIS7+

  1. Create a new Application Pool for the deployment.
    1. Right-click on Appplication Pools and choose “Add Application Pool”
    2. Use the name of your MVC/WCF app as the name of your application pool, so it’s easy to tell that they go together later.
    3. Make sure .NET 4.*, Integrated pipeline, and Start Immediately are selected, and click OK.
    4. In the Application Pool list, right-click on the new pool and choose Advanced Settings
    5. Under Process Model, set Identity to “ApplicationPoolIdentity”. This creates a new account on the machine which will be used to run the pool.
  2. Create your new Application
    1. Right-click on the Site you want to use to host your new application, and choose “Add Application”
    2. The Alias is usually your application name; this becomes the root portion of the url for your application.
    3. Click the Select button to choose an application pool, and select the app pool you created in step #1
    4. Select the physical path where the application will be deployed.
    5. Click Connect As, and make sure “Application user” is selected. This tells IIS to use the application pool user created in step #1b.
    6. Don’t bother with Test Settings; it will fail at this point.
  3. Set up file system security
    1. Select your Application in the connections panel, and click on Edit Permissions in the right-hand Actions panel.
    2. Open the Security tab, and click Edit, then click Add on the dialog that comes up.
    3. In “Enter the object names to select”, type in IIS AppPool\{name of the application pool from step #1b}
      • Eg: If you named your application pool MyApp, you would type in IIS AppPool\MyApp
    4. Click on Check Names, and it should accept the name, which will appear as just your app name underlined.
    5. Click OK once to get back to the security settings, and choose the permissions you need. Typically "Read & Execute", "List Folder Contents", and "Read" are sufficient for web sites/services that don't need to modify any files. For CMS websites, the Views folder requires Full Control so that the website can write out cached razor template versions of the HTML Body content that comes from the CMS Webpages module. See step #4.
    6. Click OK two more times to go back to IIS.
  4. For CMS-based websites, Navigate to the Views folder in Windows Explorer, right-click on it and open the Properties dialog, go to the Security tab and click on the Edit button. Choose the user for your application pool, give it Full Control, and click Apply to save the change.