ASPNETDB.MDF and machine.config error

Discussion in 'Databases' started by Herna, Aug 2, 2012.

  1. I wrote a Visual C# ASP.NET application (web site), and the ASPNETDB.mdf database was automatically constructed. The application worked fine on my own computer. However, I had problems constructing the ASPNETDB database on my domain (Parallel Plesk) from where I want to publish the web site. I eventually managed to construct the database using Aspnet_regsql.exe. I then redirected the connection string in the Web.config on my own computer to use the ASPNETDB on Plesk, and it worked perfectly. However, when I load the entire application on Plesk and try to run it, the following error comes up after I have logged in:


    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 236: <membership>
    Line 237: <providers>
    Line 238: <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
    Line 239: </providers>
    Line 240: </membership>

    Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config Line: 238
    ________________________________________
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


    I have checked the machine.config file, and line 238 is not even what is indicated above. I added some lines to the machine.config file, but those changes seems to be completely ignored, as the incorrect line numbers indicates. Therefore, some other machine.config file must be read, but I do not know from where.

    Can you please advise me how to solve this error?
     
  2. Elshadriel

    Elshadriel Winhost Staff

    Last edited by a moderator: Oct 14, 2015

Share This Page