Showing posts with label configured. Show all posts
Showing posts with label configured. Show all posts

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.

Sunday, February 12, 2012

Cannot connect to AdventureWorks db

All,

I am running SQL05 Dev with AdventureWorks on my desktop with local admin rights. I also have it configured to connect locally since it's a DEV version of SQL.

When I use either of the connection strings below I get the error message at the end of this post.

Thanks,

>Scott

Here are the strings:

Data source=(local); initial catalog=AdventureWorks or Data source=(SQLDEV05); initial catalog=AdventureWorks

Here is the error message:

TITLE: Microsoft Report Designer

A connection cannot be made to the database.
Set and test the connection string.

ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

Although it should work if you are connecting locally, you may want to try enabling TCP/IP and Named Pipes connections (which are off by default) just to see if that solves the problem. You can do this through SQL Server Surface Area Configuration tool. Let us know if that works, if not, it may be a different issue.

|||

Hi:

According to the connection string you posted, please try the following changes and see if any of them works for you:

Origional: "Data source=(local); initial catalog=AdventureWorks"

Modified: "Data source=(local); initial catalog=AdventureWorks; Integrated Security=true"

or

Origional: "Data source=(SQLDEV05); initial catalog=AdventureWorks;"

Modified: "Data source=SQLDEV05; initial catalog=AdventureWorks; Integrated Security=true"

For more information about connection string, please use the following link for references.

http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx

Hope this helps. :-)

Thanks.

Friday, February 10, 2012

cannot connect to a named instance via TCP/IP

Are you connecting to your office through VPN or is your
firewall just configured to allow you to access port 1433?
If it is the latter, you must configure your firewall to
allow you access on the port that the named instance is
listening on (each instance has its own port and only the
default instance will be listening on 1433). You can
find the port the named instance is using by looking at
the TCP/IP properties for the instance in the server
network utility.
Hope this helps.
Tim
quote:

>--Original Message--
>Hi all,
>I have a SQL server running on a WIN2k server at my

office.
quote:

>I have an application running on a named instance of the

sql server, say SQL_instance1.
quote:

>Due to some reason, I have to connect to the SQL server

named instance from my home workstation. Therefore, I
have already set a portmapping (1433) on my company
firewall and use the IP address, say 61.88.17.3, to
connect the sql server at my home.
quote:

>However, I find that I cannot register the sql server at

the EM and the error message is "SQL server not found or
access denied". I am sure the login name and password is
correct and the firewall setting is correct also (Since I
can use telnet to connect the server, the command is :
telnet 61.88.17.3 1433).
quote:

>Anyone know how to solve this problem '
>I use the following connection string to register the

remote sql server in my workstation EM.
quote:

>61.88.17.3\SQL_instance1
>Thank in advance
>Regards,
>ong
>.
>
thx for your reply.
I use 1433 for my named instance and the I have configured the firewall to a
llow 1433.
I even try to configure the firewall to allow all TCP/IP, but I still cannot
connect to my SQL server.
-- Tim Richardson wrote: --
Are you connecting to your office through VPN or is your
firewall just configured to allow you to access port 1433?
If it is the latter, you must configure your firewall to
allow you access on the port that the named instance is
listening on (each instance has its own port and only the
default instance will be listening on 1433). You can
find the port the named instance is using by looking at
the TCP/IP properties for the instance in the server
network utility.
Hope this helps.
Tim
quote:

>--Original Message--
>Hi all,
office.[QUOTE]
>I have an application running on a named instance of the

sql server, say SQL_instance1.
quote:

>Due to some reason, I have to connect to the SQL server

named instance from my home workstation. Therefore, I
have already set a portmapping (1433) on my company
firewall and use the IP address, say 61.88.17.3, to
connect the sql server at my home.
quote:

>However, I find that I cannot register the sql server at

the EM and the error message is "SQL server not found or
access denied". I am sure the login name and password is
correct and the firewall setting is correct also (Since I
can use telnet to connect the server, the command is :
telnet 61.88.17.3 1433).
quote:

>Anyone know how to solve this problem '
remote sql server in my workstation EM.[QUOTE]
>61.88.17.3\SQL_instance1
>ong
>.
>