Link to home
Start Free TrialLog in
Avatar of TommyTwoPints
TommyTwoPintsFlag for Thailand

asked on

SQL Connection through Microsoft ISA Proxy Server

Hi Experts

I have developed an applicaton that connects to a remote database. This application works fine on most machines but in one office they connect to the internet through a proxy server. Because of this, the database cannot be accessed and the following exception occurs:  

System.Data.SqlClient.SqlException: 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:
TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
   at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjec
t stateObj)
   at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
   at
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
   at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
   at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentit
y identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean
redirectedUserInstance)
   at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOpti
ons options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
   at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnec
tion owningConnection, DbConnectionPool pool, DbConnectionOptions options)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject)
   at
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject)
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject)
   at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
   at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()

How can I configure the connection to the remote database so it works through the ISA proxy server? Or can this be configured through the actual ISA proxy server.

Thanks in advance

Tom
Avatar of Keith Alabaster
Keith Alabaster
Flag of United Kingdom of Great Britain and Northern Ireland image

<<System.Data.SqlClient.SqlException: 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:
TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException>>

Would need to know the rules applied to ISA. If ISA is installed as a proxy only or as a firewall/proxy? Are they using the ISA firewall client? The tcp error stating that the sql db actively refused the connection - do you see reject log messages for these connections on the db server - or is the traffic not really getting that far?
Avatar of TommyTwoPints

ASKER

Hi Keith,

Thank you for your quick reply,

As this is a clients office I do not actually know how their ISA is configured nor do I have access to their server.

Where is the error log file on the remote server which contains the database? This is our remote server so i have access to this.

Cheers

Tom
No idea Tom. ISA is my area of speciality rather than sql.
Reading your question, it suggested that the app was installed on the remote work stations and that that they connected to a database server that was held elsewhere - are you saying the database server is remote 9to you) but on the same site as the work stations?
The application is installed on the clients machine in their office which are all connected to their ISA proxy server VIA a local network.

The database server is remote to everyone as it is a rented server based in the United States.

No error dump is being created so the connection is being blocked by the proxy server. I expect the client application is confused and thinks it is the database rejecting it and not the proxy server.

If I was to connect to the database through the port for the proxy server, could this work?

Cheers

Tom
ASKER CERTIFIED SOLUTION
Avatar of TommyTwoPints
TommyTwoPints
Flag of Thailand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial