SqlConnection

  • Thread starter Thread starter Thor W Hammer
  • Start date Start date
T

Thor W Hammer

Does ADO.NET send the password and other information over the network in
clear text when using System.Data.SqlClient.SqlConnection?

TWH
 
Thanks,

I have created a user on the remote database server, and given it
permissions to my database.
How do I connect to the database using that user-account? Can I specify the
user and password in the connectstring? However I have tried, but I get this
exception:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection

Any suggestions on how to get connected to the database ?

TWH




Miha Markic said:
In Sql authentication mode yes. If Windows auth. then no.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Thor W Hammer said:
Does ADO.NET send the password and other information over the network in
clear text when using System.Data.SqlClient.SqlConnection?

TWH
 
Hi Thor,

Either use SSL (see Net-Library Encryption sql server help topic) or some
sort of tuneling like VPN.
There are other solutions, too.
--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Thor W Hammer said:
Thanks,

I have created a user on the remote database server, and given it
permissions to my database.
How do I connect to the database using that user-account? Can I specify
the user and password in the connectstring? However I have tried, but I
get this exception:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection

Any suggestions on how to get connected to the database ?

TWH




Miha Markic said:
In Sql authentication mode yes. If Windows auth. then no.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Thor W Hammer said:
Does ADO.NET send the password and other information over the network in
clear text when using System.Data.SqlClient.SqlConnection?

TWH
 
Let's see your connection string. You should be including a SQL Server
LoginID and Password therein. Of course, this assumes that the server is
setup to accept SQL Server authentication--it does not default to this
setting.


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________


Thor W Hammer said:
Thanks,

I have created a user on the remote database server, and given it
permissions to my database.
How do I connect to the database using that user-account? Can I specify
the user and password in the connectstring? However I have tried, but I
get this exception:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection

Any suggestions on how to get connected to the database ?

TWH




Miha Markic said:
In Sql authentication mode yes. If Windows auth. then no.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Thor W Hammer said:
Does ADO.NET send the password and other information over the network in
clear text when using System.Data.SqlClient.SqlConnection?

TWH
 
A bit hard to comment on without seeing your connex. string.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------




Thor W Hammer said:
Thanks,

I have created a user on the remote database server, and given it
permissions to my database.
How do I connect to the database using that user-account? Can I specify
the user and password in the connectstring? However I have tried, but I
get this exception:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection

Any suggestions on how to get connected to the database ?

TWH




Miha Markic said:
In Sql authentication mode yes. If Windows auth. then no.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Thor W Hammer said:
Does ADO.NET send the password and other information over the network in
clear text when using System.Data.SqlClient.SqlConnection?

TWH
 
The idea was to keep the string secret. Until now I have tried to do so by
hiding the connect string in registry with encryption. Now I just read on
this group that the string (at least the password) is sent in clear text
over the network, so I might as well post it here.

Password=123qweASD;User ID=ZXDF;Initial Catalog=database1;Data
Source=123.123.123.123

I tried to set up the user on the win2003 server with the same password and
give it access to the database. As I thought it didn't work.


Sahil Malik said:
A bit hard to comment on without seeing your connex. string.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------




Thor W Hammer said:
Thanks,

I have created a user on the remote database server, and given it
permissions to my database.
How do I connect to the database using that user-account? Can I specify
the user and password in the connectstring? However I have tried, but I
get this exception:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection

Any suggestions on how to get connected to the database ?

TWH




Miha Markic said:
In Sql authentication mode yes. If Windows auth. then no.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Does ADO.NET send the password and other information over the network
in clear text when using System.Data.SqlClient.SqlConnection?

TWH
 
Back
Top