Please help - I may end up losing my job if I don't have this working!!

Discussion in 'ASP.NET 2.0' started by Mahdi837, Jun 11, 2007.

  1. Hi All,


    I need your help with a very strange message. The application was working fine, I started getting this message from today noon. Furthermore, I had a backup of the application which was working, and even this stopped working with the same exception.

    I am getting the following message whenever I run my ASP.NET Application:

    The connection name 'ConnectionString' was not found in the applications configuration or the connection string is empty.

    It throws the exception on the following line of code:

    <asp:SqlDataSource ID="SqlDataSource47" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString47 %>"


    The Database Provider is Oracle, and I am using ASP.NET with VB Script.

    Following is my Web.config code:




    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


    <connectionStrings>


    <add name="ConnectionString47" connectionString="Data Source=Servername;User ID=***;Password=***;Unicode=True"


    providerName="System.Data.OracleClient" />


    </connectionStrings>


    <system.web>


    <compilation debug="true" strict="false" explicit="true"/>


    <pages>


    <namespaces>


    <clear/>


    <add namespace="System"/>


    <add namespace="System.Data"/>


    <add namespace="System.Collections"/>


    <add namespace="System.Collections.Specialized"/>


    <add namespace="System.Configuration"/>


    <add namespace="System.Text"/>


    <add namespace="System.Text.RegularExpressions"/>


    <add namespace="System.Web"/>


    <add namespace="System.Web.Caching"/>


    <add namespace="System.Web.SessionState"/>


    <add namespace="System.Web.Security"/>


    <add namespace="System.Web.Profile"/>


    <add namespace="System.Web.UI"/>


    <add namespace="System.Web.UI.WebControls"/>


    <add namespace="System.Web.UI.WebControls.WebParts"/>


    <add namespace="System.Web.UI.HtmlControls"/>


    </namespaces>


    </pages>


    Please Help as this is a very critical project for me.


    Thanks,


    Mahdi<!-- Edit -->


     
  2. I see connectionStrings(lower case) in your web.config and ConnectionString='<%$ C</font>onnectionStrings:ConnectionString47 %>' in your control.

    Try using ,

    ConnectionString='<%$ c</font>onnectionStrings:ConnectionString47 %>' in your control ('c'(in red) is lower case)

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. You are realy good :)... thanks alot
     

Share This Page