473,396 Members | 2,109 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,396 software developers and data experts.

Connection string and plain text password in app.config

Hi all, please forgive me for what might be a FAQ but I can't find how
to solve my problem.

I am involved in a relatively big project where we used visual studio
to design our forms, including SqlConnection(s). Any form has its own
SqlConnection, and all connections read the same connection string
from app.config. We initially thought that we could use windows
authentication but some customers need to use sql server
authentication. Now that we already have our project set up this way,
how can we avoid to put a password in plain text in app.config to
connect to the db? We even tried to implement a custom sql connection
using TypeDelegator and an implicit type converter to SqlConnection
(which is sealed), and substituting SqlConnection with our type into
InitializeComponents (so that the connection string is assigned into
InitializeComponents, and then updated by our class), and this works,
but screws up the design window because SqlDataAdapter expects a
"real" SqlConnection.

The questions, at this point, are two:

1. how can we avoid putting that password into app.config

2. (independently) how does one use typedelegator? Can inheritors be
used only with reflection or is there a way to cast a typedelegator to
a specific type at compile time?

Thanks

Vincenzo Ciancia
Nov 16 '05 #1
0 1372

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

Similar topics

4
by: Linus Nikander | last post by:
Having recently load-tested the application we are developing I noticed that one of the most expensive (time-wise) calls was my fetch of a db-connection from the defined db-pool. At present I fetch...
5
by: Dmitry Karneyev | last post by:
Hi All! I've got an ado.net app with several win forms. In the first form (form1) I connect to DB and in other forms I use connection string generated by the form1 and stored in sqlconnection...
3
by: bob | last post by:
Hi, I am trying to encrypt my connection string in the app.config file. I am using Base64 encryption, I just want to hide it from casual users. I keep getting file not found error. However...
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
14
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
3
by: Fariba | last post by:
Hello All, I have an asp.net application hosting in IIS 6.0 which talks to a database in another DMZ (with firwall installed in between). I know that I can enrypt and decrypt my connection...
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...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.