PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

Connect using SQL Authentication in a non trusted environment

 
 
=?Utf-8?B?TFA=?=
Guest
Posts: n/a
 
      22nd Nov 2005
Hello all,

I need to connect to a SQL 2000 from a .net app using SQL Authentication.
My connection string looks like this:
Dim conn As New SQLConnection
conn.ConnectionString = "user id = validuser; password = validpassword;
Trusted_Connection=False; Intial Catalog=pubs; Data Source =
10.24.4.126,1433;Network Library=DBMSSOCN"

This connection string works when I use a internal IP to connect to a
internal SQL server but not when I need to connect to the outside world.

SQL Server is set for mixed mode.

Any thoughts.
 
Reply With Quote
 
 
 
 
Rene
Guest
Posts: n/a
 
      22nd Nov 2005
First things first, did you try pinging the server you are trying to
connect?



Second, is your SQL server configured to talk to the outside world? Enabled
Protocols Named Pipes, TCP/IP etc?



"LP" <(E-Mail Removed)> wrote in message
news:12BCF4AA-D638-480A-B7A1-(E-Mail Removed)...
> Hello all,
>
> I need to connect to a SQL 2000 from a .net app using SQL Authentication.
> My connection string looks like this:
> Dim conn As New SQLConnection
> conn.ConnectionString = "user id = validuser; password = validpassword;
> Trusted_Connection=False; Intial Catalog=pubs; Data Source =
> 10.24.4.126,1433;Network Library=DBMSSOCN"
>
> This connection string works when I use a internal IP to connect to a
> internal SQL server but not when I need to connect to the outside world.
>
> SQL Server is set for mixed mode.
>
> Any thoughts.



 
Reply With Quote
 
luxspes
Guest
Posts: n/a
 
      22nd Nov 2005
LP wrote:
> Hello all,
>
> I need to connect to a SQL 2000 from a .net app using SQL Authentication.
> My connection string looks like this:
> Dim conn As New SQLConnection
> conn.ConnectionString = "user id = validuser; password = validpassword;
> Trusted_Connection=False; Intial Catalog=pubs; Data Source =
> 10.24.4.126,1433;Network Library=DBMSSOCN"
>
> This connection string works when I use a internal IP to connect to a
> internal SQL server but not when I need to connect to the outside world.

Hi!
What do you mean by "connect to the outside world." does it mean that
you want to connect to you sqlserver from outside you network? are you
sure that the firewall (or router) between you outside computer and you
inside server allow traffic to the 1433 to your inside SQLServer?

>
> SQL Server is set for mixed mode.
>
> Any thoughts.

 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      22nd Nov 2005
LP,

The 10.xxx.xxx.xxx range of the IP addresses is typical (as partial some
others) meant to be used inside an internal organisation. It is not known in
the Internet DNS.

To get this for the outside world, you need from your system administrator
an outside world DNS for the server where this database is running on (and
should be enclosed on your firewall).

I hope this helps,

Cor


 
Reply With Quote
 
=?Utf-8?B?TFA=?=
Guest
Posts: n/a
 
      22nd Nov 2005
Hi Rene,

Thanks for getting back with me. Yes I can ping the server. Yes the tcp/ip
is configured and the port is open for traffic.


BTW the error I get is that the connection is not trusted.


"Rene" wrote:

> First things first, did you try pinging the server you are trying to
> connect?
>
>
>
> Second, is your SQL server configured to talk to the outside world? Enabled
> Protocols Named Pipes, TCP/IP etc?
>
>
>
> "LP" <(E-Mail Removed)> wrote in message
> news:12BCF4AA-D638-480A-B7A1-(E-Mail Removed)...
> > Hello all,
> >
> > I need to connect to a SQL 2000 from a .net app using SQL Authentication.
> > My connection string looks like this:
> > Dim conn As New SQLConnection
> > conn.ConnectionString = "user id = validuser; password = validpassword;
> > Trusted_Connection=False; Intial Catalog=pubs; Data Source =
> > 10.24.4.126,1433;Network Library=DBMSSOCN"
> >
> > This connection string works when I use a internal IP to connect to a
> > internal SQL server but not when I need to connect to the outside world.
> >
> > SQL Server is set for mixed mode.
> >
> > Any thoughts.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?TFA=?=
Guest
Posts: n/a
 
      22nd Nov 2005
Hi,

Thanks for getting back with me. Yes connecting to the SQL server outside
my network. I know both servers will connect but I'll need the network admin
to check the firewall.

BTW the error I get is that the connection is not trusted.

Thanks,




"luxspes" wrote:

> LP wrote:
> > Hello all,
> >
> > I need to connect to a SQL 2000 from a .net app using SQL Authentication.
> > My connection string looks like this:
> > Dim conn As New SQLConnection
> > conn.ConnectionString = "user id = validuser; password = validpassword;
> > Trusted_Connection=False; Intial Catalog=pubs; Data Source =
> > 10.24.4.126,1433;Network Library=DBMSSOCN"
> >
> > This connection string works when I use a internal IP to connect to a
> > internal SQL server but not when I need to connect to the outside world.

> Hi!
> What do you mean by "connect to the outside world." does it mean that
> you want to connect to you sqlserver from outside you network? are you
> sure that the firewall (or router) between you outside computer and you
> inside server allow traffic to the 1433 to your inside SQLServer?
>
> >
> > SQL Server is set for mixed mode.
> >
> > Any thoughts.

>

 
Reply With Quote
 
=?Utf-8?B?TFA=?=
Guest
Posts: n/a
 
      22nd Nov 2005
Thanks I'll check that this morning

"Cor Ligthert [MVP]" wrote:

> LP,
>
> The 10.xxx.xxx.xxx range of the IP addresses is typical (as partial some
> others) meant to be used inside an internal organisation. It is not known in
> the Internet DNS.
>
> To get this for the outside world, you need from your system administrator
> an outside world DNS for the server where this database is running on (and
> should be enclosed on your firewall).
>
> I hope this helps,
>
> Cor
>
>
>

 
Reply With Quote
 
Rene
Guest
Posts: n/a
 
      22nd Nov 2005
> BTW the error I get is that the connection is not trusted.

Interesting, I have gotten this error before but this was because the SQL
server was configured to work only on a trusted environment but this does
not seem to be your case since you have it as mix mode.

Try connecting to the server using the Query Analyzer rather than doing it
by code, sometimes the Query Analyzer will give you a more descriptive error
and it also takes cares about all of those nasty connection parameters.

If you are able to connect with the Query Analyzer then it means that
something is wrong with your connection string. If you can't connect with
Query Analyzer then something is probably wrong with your
Server/Client/Firewall/etc configuration.





 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run an ASP1.0 application in a non-fully-trusted environment? Marlon Bodicker Microsoft ASP .NET 8 26th Nov 2009 09:14 PM
How to run an ASP1.0 application in a non-fully-trusted environment? Marlon Bodicker Microsoft Dot NET Framework 0 23rd Nov 2009 06:35 PM
How to run an ASP1.0 application in a non-fully-trusted environment? Marlon Bodicker Microsoft Dot NET 0 23rd Nov 2009 06:35 PM
Best practices for using forms authentication and security in a hosted env (was: Re: Using a Forms authentication in a shared hosting environment) JEFF Microsoft ASP .NET 1 12th Nov 2007 07:00 PM
Writing Code for Semi-trusted Environment Ivan Medvedev [MS] Microsoft Dot NET Framework 1 6th Sep 2003 12:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:04 PM.