Raskaroth
Raskaroth

Reputation: 659

ASP.net4 sql connection issues

Okay, some background first:

I have 2 servers at home, 1 of them runs the Webserver, while the other one is pretty much a data server.

Both of these servers have 2 Gigabit lan ports. Lan port 1 on both servers are directly connected to the internet. while Lan port 2 is connecting the two of them together. (See Schematic: Schematic http://www.swan10.nl/stuff/schematic.png

This works all perfectly fine when I turn the internet connection off on one of these machines. However when I turn the internet connection on on both of these machines the Web server tries to obtain it's data through the internet connection, but I don't allow the SQL server to be seen over the internet.

Now I was wondering if it is possible to tell the Web server which connection to use, because I need both of these devices to have an independent internet access. So telling the Webserver to use connection 1 (internet) for just the internet connections, and use Connection 2 (link) solely to connect to the SQL server/Data Server

Both computers have their own static public WAN IP they are directly connected to the internet, they are also directly connected to each other, there is no router in-between them. So far i only managed to make it work when i made the SQL server visible to the internet which is not what I want.

Any help regarding this would be very much appreciated, thank you in advance.

ADD:

I have already tried various answers posted on the internet, I also tried and see if the SQL server is actually listening which it is, it just uses the wrong connection if both are connected independantly to the internet and to each other.

Upvotes: 1

Views: 126

Answers (1)

Raskaroth
Raskaroth

Reputation: 659

Make sure you use IP instead of Server Name in the connection string when using mentioned set up.

Thank you "Paige Cook" for refreshing my memory, and pretty much supplying me with my own answer!

Upvotes: 1

Related Questions