0
votes

I upload my web site and database in somee host , somee host give me connection string :

workstation id=ASPNETDB1.mssql.somee.com;packet size=4096;user id=*****;pwd=****;data source=ASPNETDB1.mssql.somee.com;persist security info=False;initial catalog=ASPNETDB1

In localhost my connection string is :

 <add name="ASPNETDBConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

I change my connection string :

<add name="ASPNETDBConnectionString1" connectionString="workstation id=ASPNETDB1.mssql.somee.com;packet size=4096;user id=*****;pwd=*****;data source=ASPNETDB1.mssql.somee.com;persist security info=False;initial catalog=ASPNETDB1"  providerName="System.Data.SqlClient" />

And I try too :

  <add name="ConnectionString1" connectionString="server=ASPNETDB1.mssql.somee.com;packet size=4096;user id=****;pwd=****;data source=ASPNETDB1.mssql.somee.com;persist security info=False;initial catalog=ASPNETDB1" providerName="System.Data.SqlClient" />

But when I login in my website show 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)

Can you please help me to find out what is wrong in this scenario?

1
I see that you have correct details. I think you should ask the correct connection string with your current provider.user1229931

1 Answers

0
votes

Check this: http://www.connectionstrings.com/sql-server-2005/ In yours connectionstring seem that the server ip address or name is missing:

Server=<******myServerAddress*****>;Database=ASPNETDB;User Id=******;Password=*****;