title: Page Not Found (404) on ASP.NET Postback from Default Page in a Subdirectory
body: <p>A website's default page is setup as follows:</p>
  
  <p><a href="http://mysite.com/myapp/" rel="nofollow noreferrer">http://mysite.com/myapp/</a> ==> <a href="http://mysite.com/myapp/views/default.aspx" rel="nofollow noreferrer">http://mysite.com/myapp/views/default.aspx</a></p>
  
  <p>As you can see the only thing a little out of the ordinary is that the default page is in a subdirectory (views)</p>
  
  <p>If I access the page via the default URL (<a href="http://mysite.com/myapp/" rel="nofollow noreferrer">http://mysite.com/myapp/</a>) the form tag looks like this</p>
  
  <pre><code>&lt;form name="aspnetForm" method="post" action="default.aspx" id="aspnetForm"&gt;
  </code></pre>
  
  <p>The problem is that the page posts back to <a href="http://mysite.com/myapp/default.aspx" rel="nofollow noreferrer">http://mysite.com/myapp/default.aspx</a> (missing the "/views/" part of the path) which is a non-existent page, so I get a Page Not Found (404) error.</p>
  
  <p>Has anyone else experienced this?  What is the workaround?</p>