473,473 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Config file settings

I use the app.config file to store my SQL Connection String settings (currently using integrated security)

e.g.

<add key="MyDatabase" value="data source=MyPC\Development;initial catalog=MyDatabase;Integrated Security=SSPI;packet size=4096" /

Whilst I will use SQL authentication for some PCs I do not wish for the UID or PWD to be revealed on a live app
How can I use the config file safely to include SQL Authentication without revealing them in the released config file

Thank
Gerr

Nov 20 '05 #1
6 1781
> Whilst I will use SQL authentication for some PCs I do not wish for the
UID or PWD to be revealed on a live app.
How can I use the config file safely to include SQL Authentication without

revealing them in the released config file ?

Gerry, you might want to checkout this:

http://www.derkeiler.com/Mailing-Lis...2-01/0066.html

It's about web apps, but I think it might be wise to use the advice
(use integrated SQL Server security) for client apps as well.

Regards,

Palo

PS: Does your client apps connect directly to SQL Server? If yes, you
might want to add a tier or two :-)

--
http://dact.lamarvin.com/
AutoComplete component for WinForms applications. Easy to integrate, easier
to use!
http://www.vbinfozine.com/
An ordinary VB developer shares his own successes and failures
Nov 20 '05 #2
> Whilst I will use SQL authentication for some PCs I do not wish for the
UID or PWD to be revealed on a live app.
How can I use the config file safely to include SQL Authentication without

revealing them in the released config file ?

Gerry, you might want to checkout this:

http://www.derkeiler.com/Mailing-Lis...2-01/0066.html

It's about web apps, but I think it might be wise to use the advice
(use integrated SQL Server security) for client apps as well.

Regards,

Palo

PS: Does your client apps connect directly to SQL Server? If yes, you
might want to add a tier or two :-)

--
http://dact.lamarvin.com/
AutoComplete component for WinForms applications. Easy to integrate, easier
to use!
http://www.vbinfozine.com/
An ordinary VB developer shares his own successes and failures
Nov 20 '05 #3
you can keep an incrypted value in the config file decrypting it as you read
it in your app, if you yust want to prevent direct reading the easyest is to
add a number to the ascii value of the chars.
i know someone here is working on something to encrypt our own type of
config file, you could try that 2. Its all up to you and how safe do you
want to be.

eric

"Gerry" <an*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
I use the app.config file to store my SQL Connection String settings (currently using integrated security):
e.g.

<add key="MyDatabase" value="data source=MyPC\Development;initial catalog=MyDatabase;Integrated Security=SSPI;packet size=4096" />
Whilst I will use SQL authentication for some PCs I do not wish for the UID or PWD to be revealed on a live app. How can I use the config file safely to include SQL Authentication without revealing them in the released config file ?
Thanks
Gerry

Nov 20 '05 #4
you can keep an incrypted value in the config file decrypting it as you read
it in your app, if you yust want to prevent direct reading the easyest is to
add a number to the ascii value of the chars.
i know someone here is working on something to encrypt our own type of
config file, you could try that 2. Its all up to you and how safe do you
want to be.

eric

"Gerry" <an*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
I use the app.config file to store my SQL Connection String settings (currently using integrated security):
e.g.

<add key="MyDatabase" value="data source=MyPC\Development;initial catalog=MyDatabase;Integrated Security=SSPI;packet size=4096" />
Whilst I will use SQL authentication for some PCs I do not wish for the UID or PWD to be revealed on a live app. How can I use the config file safely to include SQL Authentication without revealing them in the released config file ?
Thanks
Gerry

Nov 20 '05 #5
Gerry,

Look at System.Security.Cryptography namespace.
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemSecurityCryptography.asp

HTH,

Raymond Lewallen
"Gerry" <an*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
I use the app.config file to store my SQL Connection String settings (currently using integrated security):
e.g.

<add key="MyDatabase" value="data source=MyPC\Development;initial catalog=MyDatabase;Integrated Security=SSPI;packet size=4096" />
Whilst I will use SQL authentication for some PCs I do not wish for the UID or PWD to be revealed on a live app. How can I use the config file safely to include SQL Authentication without revealing them in the released config file ?
Thanks
Gerry

Nov 20 '05 #6
Gerry,

Look at System.Security.Cryptography namespace.
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemSecurityCryptography.asp

HTH,

Raymond Lewallen
"Gerry" <an*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
I use the app.config file to store my SQL Connection String settings (currently using integrated security):
e.g.

<add key="MyDatabase" value="data source=MyPC\Development;initial catalog=MyDatabase;Integrated Security=SSPI;packet size=4096" />
Whilst I will use SQL authentication for some PCs I do not wish for the UID or PWD to be revealed on a live app. How can I use the config file safely to include SQL Authentication without revealing them in the released config file ?
Thanks
Gerry

Nov 20 '05 #7

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

Similar topics

3
by: Jeff Robichaud | last post by:
Hello, Since it is possible to put application settings in a file other than web.config, I was wondering what is the best practice in doing so vs. putting these settings directly in web.config....
16
by: Timm | last post by:
I'm trying to use ASP objects (basically formed and populated based on Web.Config settings) and I want to use them in a different non-asp program with minimal reprogramming. So, my question is how...
2
by: Keith Elder | last post by:
Let's say you have a stand alone C# library project that is your datalayer. When this library compiles it will produce "My.DataLayer.dll" for example. In the project you use all the new...
17
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into...
4
by: Peter | last post by:
Hello I created a dll assembly unsing the settings (only application settings). I read a lot a lot about the new settings concept, but I still don't understand it. The settings are in two...
5
by: Keith | last post by:
Hello all, I have a C# Windows Forms app. It is in namespace App.GUI. It builds to Nav.exe. I have entered an application level setting using the designer. Its type is string, name is "FOO"...
8
by: aabdis | last post by:
Hello All.... I have a question... i have two Windows apps (one UI, and one service) which use a common DLL that hands out database results and such to the two apps. The DLL always connects to...
6
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I...
5
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based...
3
by: Piotrekk | last post by:
Hi I have a problem connected with user.config file. I am using default settings.settings . To settings.settings I am adding one user scope string and one application scope string. Thus...
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...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.