Steps for setting up a new MVC/WCF Deployment on IIS7+
- Create a new Application Pool for the deployment.
- Right-click on Appplication Pools and choose “Add Application Pool”
- 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.
- Make sure .NET 4.*, Integrated pipeline, and Start Immediately are selected, and click OK.
- In the Application Pool list, right-click on the new pool and choose Advanced Settings
- Under Process Model, set Identity to “ApplicationPoolIdentity”. This creates a new account on the machine which will be used to run the pool.
- Create your new Application
- Right-click on the Site you want to use to host your new application, and choose “Add Application”
- The Alias is usually your application name; this becomes the root portion of the url for your application.
- Click the Select button to choose an application pool, and select the app pool you created in step #1
- Select the physical path where the application will be deployed.
- Click Connect As, and make sure “Application user” is selected. This tells IIS to use the application pool user created in step #1b.
- Don’t bother with Test Settings; it will fail at this point.
- Set up file system security
- Select your Application in the connections panel, and click on Edit Permissions in the right-hand Actions panel.
- Open the Security tab, and click Edit, then click Add on the dialog that comes up.
- 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 inIIS AppPool\MyApp
- Eg: If you named your application pool
- Click on Check Names, and it should accept the name, which will appear as just your app name underlined.
- 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.
- Click OK two more times to go back to IIS.
- 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.