title: How do I deploy a VS2010 Web Site (Razor) to IIS7 on Windows Server 2008?
body: <p>I've created a new Application that points to the files. It is running in ASP.NET 4.0 Integrated App Pool.</p>
  
  <p>The files are just a couple of CSHTML files and some CSS/Javascript.</p>
  
  <p>When the files were HTML I was able to hit them just fine. Now that they are cshtml, I get </p>
  
  <pre><code>This type of page is not served
  </code></pre>
  
  <p>when I try to hit the Directory/File.cshtml in a browser.</p>
  
  <p>I usually write MVC3 apps, but this is just a simple 2 page site that needs to be up. I'm not familiar with deployment of these types of projects. Any advice would be helpful.</p>
  
  <p>My web.config is simple and looks as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
   &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0" /&gt;
   &lt;/system.web&gt;
  &lt;system.webServer&gt;
  &lt;defaultDocument enabled="true"&gt;
    &lt;files&gt;
      &lt;add value="MyFile.cshtml"/&gt;        
    &lt;/files&gt;
  &lt;/defaultDocument&gt;
  &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
  &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Thanks in advance for your help!</p>