Getting my web application to talk to SQL through the firewall
Posted on 2007-09-28
I have my asp.net 2 application sitting on a windows 2003 server trying to communicate through a firewall with a named instance of an SQL 2005 database sitting on another box.
I am being told that my app is trying to go through the firewall on a number of different ports, it seems, fairly randomly. I have found out that I can create a new Alias in SQL 2005 and assign a specific port number in there. For example 8484 and the firewall can then be opened up on this port.
If we say my server name = "SN" and instance name of SQL Server = "IN" then which one of SN or IN should go in the Alias Name field or should it be both (ie Alias Name=SN/IN) ?
In my connection string I have value="SERVER=TCP:SN/IN" should I then have a ',' after IN to specify port. SO, SERVER=TCP:SN/IN, 8484.
I hope this makes sense. Is this the best way to do it?
Many thanks for any help