Connection name 'SQL' was not found in the applications configuration or the connection string is empty
<p>Please i have been seeing this error:</p>

<blockquote>
  <p>The connection name 'SQL' was not found in the applications
  configuration or the connection string is empty.  Description: An
  unhandled exception occurred during the execution of the current web
  request. Please review the stack trace for more information about the
  error and where it originated in the code.</p>
</blockquote>

<p>I know for a fact that the connection name "SQL" exists and it works properly on my local machine.</p>

<p>I started seeing this error after i fixed this other error on my deployment server:</p>

<blockquote>
  <p>Compiler Error Message: BC31007: Unable to open module file
  'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files</p>
</blockquote>

<p>by setting up the access rights as suggested <a href="http://falhan.net/?p=152" rel="nofollow">here</a></p>

<p>Please i would appreciate any help on this.</p>

<p>thanks!</p>

<p>Deployment Environment : Windows Server 2003, .net 4.0 <br/>
Development Environment: Widows 7, .net 4.0</p>

<p>Please note: The deployed application has been working perfectly well on site, for over 3 months up till last Friday evening.</p>

<p>The client claims nothing on the server or in their environment has changed. </p>

<p>My Web Config:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;configuration&gt;
    &lt;appSettings&gt;
        &lt;add key="LoginMode" value="2" /&gt;
        &lt;add key="CustomeModules" value="True" /&gt;
        &lt;add key="TopCallersRefeshInterval" value="600" /&gt;
        &lt;add key="OperatorAccountName" value="" /&gt;
        &lt;add key="ChartImageHandler" value="storage=file;timeout=20;dir=C:\TempImageFiles\;"/&gt;
    &lt;/appSettings&gt;
    &lt;connectionStrings&gt;
        &lt;add name="SQL" connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;" providerName="System.Data.SqlClient" /&gt;
        &lt;add name="SQLCustom" connectionString="server=.\SQL2008;database=xxxxxx;uid=xxxxxx;pwd=xxxxxxxxxx;" providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;system.web&gt;
        &lt;httpHandlers&gt;
     &lt;add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" /&gt;
    &lt;/httpHandlers&gt;
    &lt;pages&gt;
     &lt;controls&gt;
        &lt;add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
     &lt;/controls&gt;
    &lt;/pages&gt;
    &lt;compilation debug="true" targetFramework="4.0" explicit="true"&gt;
            &lt;assemblies&gt;
                &lt;add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /&gt;
                &lt;add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
                &lt;add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
                &lt;add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
                &lt;add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;&lt;/assemblies&gt;
        &lt;/compilation&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
        &lt;defaultDocument&gt;
            &lt;files&gt;
                                &lt;remove value="login.aspx" /&gt;
                &lt;remove value="iisstart.htm" /&gt;
                &lt;remove value="default.aspx" /&gt;
                &lt;remove value="index.html" /&gt;
                &lt;remove value="index.htm" /&gt;
                &lt;remove value="Default.asp" /&gt;
                &lt;remove value="Default.htm" /&gt;
                &lt;add value="home.aspx" /&gt;
            &lt;/files&gt;
        &lt;/defaultDocument&gt;
        &lt;handlers&gt;
            &lt;add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
        &lt;/handlers&gt;
    &lt;/system.webServer&gt;
&lt;/configuration&gt;
</code></pre>
