473,320 Members | 1,854 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,320 software developers and data experts.

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 1777
> 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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.