Error : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does


Hi All, i am using tha conncetion string in web.config. <add name="MyLocalSqlConnection" connectionString="Data Source=.\SqlExpress;AttachDbFilename=|DataDirectory|\SqlServer\OC00003SQL.mdf;User Instance=false" providerName="System.Data.SqlClient"/>
 Instance=false and true both i have used
 but i am getting error like that. on my web hosting site
 Error : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
 can u send me the solutions of that problem.
Thanks in Advance.
Dheeraj Mittal
0
dheeraj_mittal02
10/21/2008 2:04:02 PM
📁 asp.net.time-tracker-kit
📃 398 articles.
⭐ 0 followers.

💬 2 Replies
👁️‍🗨️ 2257 Views



 I am getting the same error, does anyone have an update on this?
 
0
henropotter
10/21/2008 6:49:21 PM

Set Try to set Data Source = "Server name" in connection string
Open "SQL Server Surface Area Configuration"
then opne the "Surface Area Configuartion for Services and Connections "
Under the Remote connection u have to enable the "Using both TCP/IP and Named  Pipes "
then It will work..
Try to set Data Source= "serverName" in you connectionString
Data Source=.\SQLEXPRESS will work only on local m/c, It will not work if you host your site
Check in web.config for connectionString, configure it according to your server name, password etc.
In Time Tracking System, it uses inbuild Membership classes for user creation, updation etc..
You have to register your DB with ASP.NET Membership classes by executing the command line utility in VS prompt
aspnet_regsql, it will open one window, where you  have to configure DB.
Hope it will help you, let me know.
Hope it will help you, let me know.
http://forums.asp.net/t/1260556.aspx
http://forums.asp.net/t/913172.aspx
http://forums.asp.net/t/1008091.aspx

Chetan Sarode
Software Engineer,
Approva Systems Pvt Ltd,
Pune, India.
0
chetan
10/22/2008 3:45:39 AM
Reply:

Similar Artilces: