Re: where to save user settings in an app

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



It almost goes without saying that a .NET application that has any sort of
software activation or licensing technology *must* be obfuscated.

Since I got the dotfuscator professional I forget whether the community
edition that comes with VS does string encryption.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:%23YME4tX2FHA.2444@xxxxxxxxxxxxxxxxxxxxxxx
> Dica,
>
> Generally speaking, I would agree with Bob's response. The only things
> I would add is that this should really be contained in the app.config file
> for your app.
>
> Like Bob said, you can use encryption algorithms to encrypt the
> username and password.
>
> The only problem is where you will store the encryption key. Because
> it is easy to disassemble .NET code, if you hard code the key somewhere,
> it will be easy to find, and someone can circumvent the encryption easily.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> "Dica" <genpub5@xxxxxxxxxxx> wrote in message
> news:NsSdnRiCytlx3cPeRVn-hw@xxxxxxxxxxxxx
>> i've got an app that needs to connect to sql server and login with a
>> useName/password. currently, my app saves this info in an XML file in
>> plain
>> text (i.e. no encryption). everytime the app is opened, the XML file is
>> read
>> and the userName/password used to establish the sql connection. is this
>> the
>> normal way of doing things, or is it smarter to save these set tings
>> elsewhere, like the registry? if saving to XML is deemed appropriate,
>> should
>> i be concerned with the plain text userName/password. i'm primarily a web
>> developer trying to move to desktop app development, so worrying about
>> saving info on the desktop is a new area for me and i'd appreciate any
>> info
>> on how this is generally done.
>>
>> tks in advance.
>>
>> .
>>
>>
>
>


.


Quantcast