Problem running my ASP.NET website

Discussion in 'Getting started' started by akella, Jun 30, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello,
    Today I have uploaded all my ASP.NET files to the domain but I get following error occuring:

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.

    Source Error:


    Line 158: <roleManager>
    Line 159: <providers>
    Line 160: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    Line 161: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    Line 162: </providers>


    Source File: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config Line: 160


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016

    I have modified connectionString in webconfig but the error in machine.config. How can I solve this problem.

    Thank you
     
  2. Hi,
    Modify your web.config conn section like the example below so it is clearing and then writing the values for LocalSqlServer:

    <connectionStrings>
    <clear />
    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=tcp:sql.discountasp.net;Initial Catalog=SQL_numid_account;User ID=SQL_numid_user;Password=pw_here"
    providerName="System.Data.SqlClient" />
    <add name="SQL2005_msftwise_userConnectionString" connectionString="Data Source=tcp:sql.discountasp.net;Initial Catalog=SQL_numid_account;User ID=SQL_numid_user;Password=pw_here"
    providerName="System.Data.SqlClient" />
    </connectionStrings>
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page