Simple website doesn't work on server
<p>i have a very simple websote just for experimentation.
On my local machine it works but when i put it on the server i get "Server Error in '/' Application.Runtime Error "</p>

<p>defaul.aspx:</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="_default"%&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;

    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>default.aspx.cs:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
</code></pre>

<p>web.config:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;configuration&gt;
    &lt;system.webServer&gt;
        &lt;directoryBrowse enabled="false" /&gt;
        &lt;defaultDocument&gt;
            &lt;files&gt;
                &lt;clear /&gt;
                &lt;add value="default.aspx" /&gt;
            &lt;/files&gt;
        &lt;/defaultDocument&gt;
    &lt;/system.webServer&gt;
&lt;/configuration&gt;
</code></pre>

<p>But when i change the aspx file it works (i've removed:CodeFile="default.aspx.cs" and Inherits="_default")</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true"%&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;

    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
