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?
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.
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?
Your connection string looks off. Try looking at thid KB article and follow the example given in the kb article on how to setup the connection string. Make sure you replace the specified values to be what is appropriate with your account. http://support.Winhost.com/KB/a619/how-to-configure-the-aspnet-20-membershiproles-provider.aspx