Sunday, February 19, 2012

Cannot connect to SQL Express from WEB Application on internet

Hi,

I have installed SQl express 2005 SP1 and then configured it to accept remote connections which works within my internal network. I can connect other client stations within our internal network.

However, when i try to connect to the database using a VB.net web application, the application cannot connect to the database.

I have a hardware firewall which configured to foward port TCP 1433 and UDP 1434 to the SQL express server.

I have also carried out a telnet communication to ports 1433 and 1434 and able to communicate on port 1433 and get an error message cannot connect to host on port 1434.

What am i doing wrong?

Thanks

To make Remote Connections available on SQL Server Express Edition, you need to do the following steps:

Enable the Remote Connections using the SQL Server Surface Area Configuration:|||

I have already done all of the above that you have mentioned.

I am able to romtely access the sql instance within my internal network but not from the internet.

here is the connection string that i am using:

appSettings>

<add key="Provider" value="Nothing" />

<add key="Data Source" value= "(IP of wan port)\(ip of database server)\SQLEXPRESS" />
<add key="Initial Catalog" value="Test" />
<add key="User ID" value="admin" />
<add key="Password" value="pasword" />

the error message i get is:

System.Exception: SQL Server does not exist or access denied. at WebApplication1.DALBase.OpenConnection()

|||See this http://msdn2.microsoft.com/en-us/library/ms175483.aspx to enable so.|||

Review if is opened the SQL Server ports in your Database Server Firewall and in the Proxy Server Firewall.

No comments:

Post a Comment