|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Connect using SQL Authentication in a non trusted environmentHello 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. 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? Show quote "LP" <L*@discussions.microsoft.com> wrote in message news:12BCF4AA-D638-480A-B7A1-CB48253D114E@microsoft.com... > 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. 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. Show quote "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" <L*@discussions.microsoft.com> wrote in message > news:12BCF4AA-D638-480A-B7A1-CB48253D114E@microsoft.com... > > 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. > > > > 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. LP wrote:
> Hello all, What do you mean by "connect to the outside world." does it mean that > > 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! 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? Show quote > > SQL Server is set for mixed mode. > > Any thoughts. 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, Show quote "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. > 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 Thanks I'll check that this morning
Show quote "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 > > > |
|||||||||||||||||||||||