X-quisite-likeyou


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




Re: Cannot connect to SQL Express from WEB Application on internet

Ronald Ricardo Ramirez Moran


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:
    • Open the SQL Server Surface Area Configuration (Start>All programs>SQL Server 2005>Surface Area Configuration)
    • Click on Surface Area Configuration for Services and Connections
    • Go to the [SQL Instance Name] > Database Engine > Remote Connections Node.
    • Under Local and Remote Connections select the option that you need to enable (Using TCP Only/NamedPipes/Both).
  • Enable SQL Server Browser and Start it:
    • Open the SQL Server Configuration Manager (Start>All programs>SQL Server 2005>SQL Server Configuration Manager)
    • Under SQL Server Configuration Manager node select SQL Server 2005 Services.
    • Right Click on SQL Server Browser and click on Properties.
    • Select the Service Tab and change the property Start Mode to Automatic
    • Return to Log On Tab and click start.

And it is all, you can to connect remotely to your SQL Server Express Instance.

Best Regards,







Re: Cannot connect to SQL Express from WEB Application on internet

X-quisite-likeyou

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()








Re: Cannot connect to SQL Express from WEB Application on internet


Re: Cannot connect to SQL Express from WEB Application on internet

Ronald Ricardo Ramirez Moran

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