PDA

View Full Version : Server Error in '/' Application.


sameer1
07-04-2010, 10:47 AM
Hi every1

When i try to login to my website i get this error.


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)
:confused::(

Please somebody help me
Thanks in advance

My connection string is:

connectionString="Data Source=tcp:sql2k803.discountasp.net;Initial Catalog=SQL2008_745946_db_SeekBook;User ID=SQL2008_745946_db_user;Password=******;"

wisemx
07-04-2010, 07:26 PM
Hi,
Try writing it like the sample below, the Clear, Add and Remove sections can often clear this up:

<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>

sameer1
07-05-2010, 01:02 AM
Hi wisemx
I try doing that its not working. I am lost completely can you suggest me some more help. I am getting the same error.

When i add the clear n remove i get some other error.

sameer1
07-05-2010, 01:15 AM
Hi


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)

Im getting the above error only when i try to login to my website. All other basic functionality like retrieving the data from database is working, but getting error when in sign up or login.

Any one please help me.

wisemx
07-05-2010, 06:17 AM
Hi,
Please post the connection section of your web.config but comment out the password.
By the way, you're not trying to connect to a SQL Express DB, right?
All the best,
Mark

sameer1
07-05-2010, 10:31 AM
Hi

Thanks for the help. Its working now, I had done mistake with my connection string :)
Now its working thanks for the help

wisemx
07-05-2010, 05:37 PM
..Good job. ;-)