title: Issues with WebConfig file while deploying ASP.NET website
body: <p>I am trying to deploy my ASP.NET website with database (SQL Server 2008) on a remote server. However, I am getting error from the WebConfig file. </p>
  
  <p><strong>WEBCONFIG</strong>: </p>
  
  <p>In VS 2010, the WebConfig contained: </p>
  
  <blockquote>
  <pre><code>&lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=SOMETOKEN"/&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
    &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  </blockquote>
  
  <p>When I ran the page on the web server, I got this error: </p>
  
  <pre><code>Details: To enable the details of this specific error message to be viewable on remote machines, please create a &lt;customErrors&gt; tag within a "web.config" configuration file located in the root directory of the current web application. This &lt;customErrors&gt; tag should then have its "mode" attribute set to "Off".
  
  
  &lt;!-- Web.Config Configuration File --&gt;
  
  &lt;configuration&gt;
      &lt;system.web&gt;
          &lt;customErrors mode="Off"/&gt;
      &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>So, I added <code>&lt;customErrors mode="Off"/&gt;</code>  and modified my Web.Config to: </p>
  
  <pre><code>&lt;compilation debug="false" targetFramework="4.0"&gt;
      &lt;customErrors mode="Off"/&gt;  
        &lt;assemblies&gt;
          &lt;add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
        &lt;/assemblies&gt;         
      &lt;/compilation&gt; 
  </code></pre>
  
  <p>But it won't help. I am still getting the same error. What am I missing? I remember deploying other project WITHOUT ASSEMBLIES (*.dlls), and that worked fine. Is the Assembly messing up something? If yes, can you please suggest the fix? </p>
  
  <p>I am surprised, that there's no SINGLE tutorial explaining the deployment of an ASP.NET "website", and what should be done to the web.config file. What special care should be taken when there's assemblies used (if at all). </p>
  
  <p>I'll appreciate help towards the smooth deployment of the same. Thanks. </p>