I'm at the point in my project where I want to move the current database for my form away from the built in sql server in VS10 to an actual SQL server on a remote machine on the local network. I'm running into issues though and have read article after
article on how to fix it with no results.
Here's my setup. I have SQL Server 2008 Express R2 running on a seperate desktop computer connected to my local network. I have attached the MDF file of my database to it. I have also set it up with both windows and sql authentication, enabled TCP/IP and
SQL Server Browser, configured the database to accept remote connections and opened the ports in the windows firewall.
I'm currently trying to add a connection through the server explorer in VS10 so that my ASP.NET app will use the remote database instead of the local one. VisualStudio seems to be able to find the server because it lists it under server name, but when I
try to select a database it doesn't list anything. If I try to type the name manually and test the connection I get this 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: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I've tried everything I can find online on how to fix this and have met failure everytime.....I don't know what's going on and I'm hoping someone can help me.
I've looked at all those settings and everything seems to be fine.
I've left the network database idea on the back burner for now. I've installed the same edition of sql server on the same machine where I'm running VS10 and the ASP.NET app and I'm still having the same trouble. The Add Connection just doesn't want to see
the server or any databases associated with it.
Any help with connecting to this now local database?
ajl321
Member
13 Points
13 Posts
ASP.NET connection to SQL Server 2008 Express R2 database
Feb 03, 2012 11:53 PM|LINK
Hello,
I'm at the point in my project where I want to move the current database for my form away from the built in sql server in VS10 to an actual SQL server on a remote machine on the local network. I'm running into issues though and have read article after article on how to fix it with no results.
Here's my setup. I have SQL Server 2008 Express R2 running on a seperate desktop computer connected to my local network. I have attached the MDF file of my database to it. I have also set it up with both windows and sql authentication, enabled TCP/IP and SQL Server Browser, configured the database to accept remote connections and opened the ports in the windows firewall.
I'm currently trying to add a connection through the server explorer in VS10 so that my ASP.NET app will use the remote database instead of the local one. VisualStudio seems to be able to find the server because it lists it under server name, but when I try to select a database it doesn't list anything. If I try to type the name manually and test the connection I get this 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: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I've tried everything I can find online on how to fix this and have met failure everytime.....I don't know what's going on and I'm hoping someone can help me.
Thank you!
nmgomes
Participant
1392 Points
246 Posts
Re: ASP.NET connection to SQL Server 2008 Express R2 database
Feb 04, 2012 01:36 AM|LINK
Some time ago I had a problem similar and I remember that it was related to the Port number.
I know it may sound silly but as far as I remember I had to remove the port (it was the default value) from the server registration.
Hope this help.
Portugal - Europe's West Coast
[Don't forget to click "Mark as Answer" on the post(s) that helped you.]
srinanthuram
Contributor
6800 Points
1549 Posts
Re: ASP.NET connection to SQL Server 2008 Express R2 database
Feb 04, 2012 04:28 AM|LINK
hi
see this url
http://www.sqlmusings.com/2009/03/11/resolving-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server/
thank u
ramiramilu
All-Star
95275 Points
14072 Posts
Re: ASP.NET connection to SQL Server 2008 Express R2 database
Feb 04, 2012 07:31 AM|LINK
some points which might help you -
1. check if sql engine got started...
2. Check if TCP/IP connections are enabled..
3. see if SQL port to my knowledge 3306 got opened for communication..
4. check your connection string..
5. see if all necessary sql services got started on services.msc..
Thanks,
JumpStart
ajl321
Member
13 Points
13 Posts
Re: ASP.NET connection to SQL Server 2008 Express R2 database
Feb 24, 2012 07:08 AM|LINK
I've looked at all those settings and everything seems to be fine.
I've left the network database idea on the back burner for now. I've installed the same edition of sql server on the same machine where I'm running VS10 and the ASP.NET app and I'm still having the same trouble. The Add Connection just doesn't want to see the server or any databases associated with it.
Any help with connecting to this now local database?