title: How do I set up an IIS website that uses a subfolder of a .NET web application as its base?
body: <p>I have a .NET web application in which I am developing three separate websites that all share some classes, master pages, etc. (Call the sites <code>mysite1</code>, <code>mysite2</code>, and <code>mysite3</code>)</p>
  
  <p>When I view the site using "View in Browser" from VS (which leads to <a href="http://localhost/projectName/mysite1/default.aspx" rel="nofollow">http://localhost/projectName/mysite1/default.aspx</a>), everything works as expected.</p>
  
  <p>However, I also setup an IIS website called <code>Mysite1</code> that uses <a href="http://mysite1/" rel="nofollow">http://mysite1/</a> and points to the "mysite1" subfolder as its local path (under Home Directory). When I visit <a href="http://mysite1/" rel="nofollow">http://mysite1/</a>, I get the following ASP.NET error:</p>
  
  <blockquote>
    <p>Parser Error Message: Could not load type
    'MyProject.Mysite1.Default'.</p>
    
    <p>Source Error: </p>
    
    <p><code>Line 1:  &lt;%@ Page Language="C#" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs"
    Inherits="MyProject.Mysite1.Default" %&gt;</code></p>
    
    <p><code>Line 2:</code></p>
    
    <p><code>Line 3:
    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;</code></p>
  </blockquote>
  
  <p>The namespaces are all valid, as evidenced by the site working correctly when run from "View in Browser". I figure it has something to do with the base folder of the application artificially changing because that's what several other errors were caused by, but I don't know how to resolve it.</p>
  
  <p>How should I have configured IIS to use the subfolder of a web application as its base folder?</p>