Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
alexjamesbrown
Starting Member
48 Posts |
Posted - 2009-04-09 : 05:44:40
|
Yes, I'm having that issue....A network-related or instance-specific error occurred while establishing a connection to SQL Server. I've got a VPS server, i've installed sql 2005 express on it - set it up etc.... done all the things with the surface area configuration.I can connect from Management Studio on my local machine - both to sa, and another user i have created.However, when i try to connect using my asp.net application, using the same credentials, i get the error.I'm using Linq (not sure if this matters) conn string is stored in web.config - it's driving me NUTSHere's my conn string (pw removed) <add name="dbConn" connectionString="Data Source=92.102.66.95;Initial Catalog=myDatabase;User Id=sa;Password=************;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" /> It is installed as the default instance on my VPS ...as a side note, if i change the connection string to "localhost" and have that in the web.config on the vps, it works fine!!!it seems like its not letting me connect via the ip address remotely.. through an asp.net application, however it will let me on |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-04-09 : 06:25:11
|
Can you ping 92.102.66.95?Can you telnet to port 1433 (or whichever port you've changed it to)?By the way, you really shouldn't use sa for this, create a seperate account for your connection. |
 |
|
alexjamesbrown
Starting Member
48 Posts |
Posted - 2009-04-09 : 06:32:40
|
i can ping 92.102.66.95 no problemhow do i test telnet??i kno i shouldn't use sa... im only using it in the interim to try and get this connection issue sorted...as you may have guessed, its also installed on the same server as my website... a cardinal sin i know, but its not a "sensitive" database, only acts as a repository for data that's cleared out and updated daily.it's really odd, because i can connect to it via management studio from my local machine just fine - its when i try and run the website (in visual studio, for debugging etc...) from my local machine i get the issue.if i upload the website to the server, and change the data source to localhost, again, it works fine! |
 |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-04-09 : 06:54:54
|
Do you have a firewall block on your local server or have your network guys got a translation missing on the domain?To connect via telnet:http://technet.microsoft.com/en-us/library/bb491013.aspx |
 |
|
tripodal
Constraint Violating Yak Guru
259 Posts |
Posted - 2009-04-09 : 16:26:01
|
Are you intending to connect directly to this sqlserver via the internet on a permenant basis? It appears to me that your running SQL and your web app on the same machine.Using local host or the private ip address for this would be much preferable than the public ip. I would not reccomend allwoing your sql server to be accessable from the internet in general. |
 |
|
bhaskarareddy
Starting Member
7 Posts |
Posted - 2012-06-04 : 22:38:21
|
hiTo resolve this error we have to enable tcp/ip in configuration manager[url]http://csharpektroncmssql.blogspot.in/2012/04/network-related-or-instance-specific.html[/url] |
 |
|
|
|
|
|
|