we have our website and database migrated from different servers into one server. The SQL database and ASP.NET website was in shared hosting before, they are on different machine and have different IP's. Before, in my ConnectionString, the server segment of CS is the external IP of the database server, I changed that to localhost or 127.0.0.1 since they are in the same machine. My question is, does it matter if it's external or local IP? Specifically, data transfer speed? And how do data are transferred when I use external IP - Local Machine > ISP > Local Machin开发者_运维技巧e? or Local Machine > Local Machine?
It can matter depending on what SQL db you are using.
Some don't accept calls that are not accessing them by 127.0.0.1, like PostgreSQL in default mode.
If you are accessing a db on local server you can configure it to not allow external connections and make your application more secure.
精彩评论