Connection String

  • Thread starter Thread starter Hemang Shah
  • Start date Start date
H

Hemang Shah

Hello

Does anyone have an example to store the connection string to a file, which
can be edited so that the application can run on clients environement.

hardcoding the connection string doesn't seem to be a good idea.

Thanks

HS
 
Excellent!

Thanks Miha
Miha Markic said:
app.config?
See the
<appSettings> Element
.net help topic.
Take note that you might want to encrypt the file if you are storing a
password there.
Event better is to store the (encrypted) value in registry
Here is an article which you might find useful:
http://msdn.microsoft.com/msdnmag/issues/03/11/ProtectYourData/default.aspx

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

Hemang Shah said:
Hello

Does anyone have an example to store the connection string to a file,
which can be edited so that the application can run on clients
environement.

hardcoding the connection string doesn't seem to be a good idea.

Thanks

HS
 
One more interesting info - in .NET 2.0 you can encrypt portions of your
config file - isn't that awesome? :)
(And this doesn't require any code modification).

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/


Hemang Shah said:
Excellent!

Thanks Miha
Miha Markic said:
app.config?
See the
<appSettings> Element
.net help topic.
Take note that you might want to encrypt the file if you are storing a
password there.
Event better is to store the (encrypted) value in registry
Here is an article which you might find useful:
http://msdn.microsoft.com/msdnmag/issues/03/11/ProtectYourData/default.aspx

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group www.codezone-si.info

Hemang Shah said:
Hello

Does anyone have an example to store the connection string to a file,
which can be edited so that the application can run on clients
environement.

hardcoding the connection string doesn't seem to be a good idea.

Thanks

HS
 
Back
Top