I use SQL Server in an ASP.Net web application and connect database with this connection string:
<add name="SQLConnectionString"
connectionString="Data Source=204.93.xxx.xxx;Initial Catalog=some_Database;User ID=someUser;Password=somePassword"
providerName="System.Data.SqlClient"/>
Suppose our web server and SQL Server are on same machine then is it the right way of defining a connection string?
If we block SQL Server port 1433 from firewall will this connection string work as here we mention IP of the machine on which SQL Server is and SQL Server connects using port 1433
Or should we use localhost instead of IP address even then firewall block port 1433 then application might still work?
.to denote "local machine". This connects as directly as possible