Problem with memberhip log in

Discussion in 'Databases' started by giorgos, Jan 12, 2010.

  1. I Publish the membership database to the Winhost SQL 2008 Server
    and i didn't have any wrong message.

    In the site
    http://www.redusepower.com/Membership.aspx

    I have add aspnet_Membership table and a log in form.

    When i navigate to the site i can see the data of aspnet_Membership table
    but when i try to log in i have the following message.

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Any idea what is wrong?
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    Did you check your web.config file and make sure you drop any connection string that calls on a SQL Express database? Typically the default connection string that comes with the application has this on the line "Data Source=.\SQLEXPRESS;AttachDbFilename".

    That usually means its looking for a SQL Express. Also try also incorporating this line..

    <remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" />

    By default 'LocalSqlServer' is setup to look for a SQL express database. If you do not expressly set it to look to your database it will automatically seek a SQL Express database to connect to.
     
  3. Thanks a lot the problem was to add name="LocalSqlServer"
     
  4. Cool, glad you got it going!
     
  5. Hello
    I am have the same problem by getting the error of the following:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

    I cannot connect to the sql.
    This is what I have in my web config of the following:

    <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />

    </connectionStrings >

    Can anyone tell me what is wrong?
     
  6. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015

Share This Page