473,395 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to hide userid/password in db connection string?

I have a db connection that uses a userid/passwd that will remain static and
the application user does not need to know/change it. However, by hardcoding
it, the plain text is available both in the Sourcecode and likely easily
parsed out of the binary.

For reference, the application is a service running in the background. It
has no UI.

So, what are some solutions to this problem? Where should the
userid/password be stored so that it is secure?

Thanks.
Nov 16 '05 #1
1 12850
Store the connection string in a config file, and use DPAPI to encrypt the
sensitive bits. Here's a link to an MSDN mag article that's a good starting
point:
http://msdn.microsoft.com/msdnmag/is...a/default.aspx

--
Mickey Williams
Author, "Visual C# .NET Core Ref", MS Press
www.neudesic.com
www.servergeek.com

"Kelly" <co*******************@hotmail.com> wrote in message
news:F6**********************************@microsof t.com...
I have a db connection that uses a userid/passwd that will remain static
and
the application user does not need to know/change it. However, by
hardcoding
it, the plain text is available both in the Sourcecode and likely easily
parsed out of the binary.

For reference, the application is a service running in the background. It
has no UI.

So, what are some solutions to this problem? Where should the
userid/password be stored so that it is secure?

Thanks.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kona | last post by:
Hello, I'm new with Oracle JDBC connection. Is it a way to crypt, hide the password string into a Oracle JDBC connection string ? The goal is to hide the password within script file. Thank's...
3
by: NK | last post by:
Hello, I am a beginner of DB2 and I am in a trouble that I can't access to sample database. Please see below. ENV : OS AIX-5.2/ DB2 8.1.2 SYMPTOM: I don't have any DB2 client terminal so...
1
by: lloyd | last post by:
i am trying to connect to my Sqlserver on my machine. i tried using the following connection strings 1) mystring= "Initial Catalog=;Data Source=localhost;Integrated...
4
by: Charlie | last post by:
Hi: I'm storing my dB connection in web.config file. Since it will be easily read by opening file, what is a good way to secure it? Thanks, Charlie
4
by: Tim Sapp | last post by:
Folks, I am working on a .Net web site that connects to SQL Server 2000 on another box. The DBA has given me a Domain user account with rights to the database and table. I have confirmed with...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
5
by: OJ | last post by:
Hi, I am at a loss here, I have a c# asp.net website which connects to a remote SQL Server 2000 db via a connection string. If I set the website up in the filesystem and use the inbuilt cassini...
19
by: Middletree | last post by:
I have never really understood connection strings. I'm not sure why, as I'm a smart guy otherwise, but I cannot make sense of any of the explanations I have seen out there over the past 7 or so...
13
by: Jennifer.Berube | last post by:
well I'm not sure how to go about making my SQL connection string... The code below is what I need to replace with my SQL connection...I just don't know if that code is for DSN or access... I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.