title: Deploy a MVC 3.0 web application project on IIS 8.0
body: <p>Normally, in webforms , when you have to deploy the application , we <strong>publish</strong> from the Visual Studio and put the published folder only on the server (IIS). But, in MVC web applications , how is it done. </p>
  
  <p>Does it follow the same way (published folder only on server ) or some other method.</p>
  
  <p>I have tried the following methods but not got any result . </p>
  
  <ol>
  <li>Web Deployment Package - After going through this tutorial -> <a href="http://pluralsight.com/training/players/PSODPlayer?author=scott-allen&amp;name=mvc3-building-deploy&amp;mode=live&amp;clip=0&amp;course=aspdotnet-mvc3-intro" rel="nofollow noreferrer">http://pluralsight.com/training/players/PSODPlayer?author=scott-allen&amp;name=mvc3-building-deploy&amp;mode=live&amp;clip=0&amp;course=aspdotnet-mvc3-intro</a></li>
  </ol>
  
  <p>under the Web Deployment Packages tutorial ,i found how to create a web deployment package which can be imported in the IIS Management Tool. Then I found out this link to help me with the same -> </p>
  
  <p><a href="http://www.iis.net/learn/publish/using-web-deploy/building-a-web-deploy-package-from-visual-studio-2010" rel="nofollow noreferrer">http://www.iis.net/learn/publish/using-web-deploy/building-a-web-deploy-package-from-visual-studio-2010</a></p>
  
  <p>. But after following all the steps I got this error ->
  (See Screenshot) <img src="https://i.stack.imgur.com/Beg7P.jpg" alt="Error after Deployment">
  <strong>What is/are the missing steps in this method?</strong> </p>
  
  <pre><code>2. Add roles - Windows Server 2012 - turn certain features of ASP.NET 3.5 and ASP.NET 4.5 on. 
  </code></pre>
  
  <p>I followed this tutorial for the above step -> </p>
  
  <p><a href="http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45" rel="nofollow noreferrer">http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45</a></p>
  
  <p>As per the tutorial , I should for deploying a MVC 3.0 application , turn on the ASP.NET 3.5 and ASP.NET 4.5 features under the "Application Development" Tab . After this, to deploy the application ,i should under the "Advanced Settings" pop up choose .net V2.0 as the Application Pool ( See ScreenShot) 
  <img src="https://i.stack.imgur.com/nUB1E.jpg" alt="enter image description here">  </p>
  
  <p>But even after following the tutorial i get the same error "<strong>Server error in Application ....</strong>" </p>
  
  <pre><code>  3. Publish under the "File System" Method. 
  </code></pre>
  
  <p>We right-click the project and select "Publish" and a Dialog box pops up showing the various options for deployment. In this we select - " File System" ( See Screenshot) <img src="https://i.stack.imgur.com/F5uy6.jpg" alt="enter image description here"></p>
  
  <p>We published the project , but got the same error once again. </p>
  
  <p>Problems / Questions -> </p>
  
  <p><strong>1. What is the correct full proof way of deploying a MVC 3.0 application on IIS 8 .  ?</strong></p>
  
  <p><strong>2. Do we need to put the whole solution on the server and run from there or otherwise</strong></p>
  
  <p><strong>3. Are we missing some step or some command in the above three methods</strong></p>
  
  <p><strong>4. Our requirement is to essentially find a way to put only the published folder on the server and run , but is that how it really works in MVC ( like web forms ) ?</strong></p>
  
  <p><strong>5. File System approach ( point 3 above ) is something which is done commonly for Webforms , is it advisable to do the same in MVC as well .</strong>    </p>
  
  <p><strong>6. The Deployment is working on localhost , but when tried by creating a Virtual Directory , it is again not working .</strong>  </p>
  
  <p><strong><em>Working environment is Visual Studio 2012 - Web Server Windows Server 2012- IIS 8</em></strong></p>
  
  <p>Need help to solve the confusion. </p>
  
  <p>Regards, 
  Mangesh </p>