Solved

How to store setup values in a vb.net application?

Posted on 2011-09-30
9
265 Views
Last Modified: 2012-05-12
HI

I have developed an application which needs to store some set up information like a FTP login, GUI behaviors, and some other stuff. The idea is that this information is dynamic, which means that the user can modify it and store it using the application.

I have found this: http://www.codeproject.com/KB/dotnet/config.aspx, is almost what I want, but I don´t want that anybody modify the information outside the application

I have been checking how other applications like filezilla stores those configurations and the only I can see is that they don´t use databases for it (or they do?).
0
Comment
Question by:dimensionav
  • 5
  • 4
9 Comments
 
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
You can encrypt portions of the configuration file described in you CodeProject article. See http://msdn.microsoft.com/en-us/library/ff647398.aspx.
0
 

Author Comment

by:dimensionav
Comment Utility
I have read that your solution is for asp.net, Is it for win forms too?
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
Comment Utility
Oops. Sorry, posted the wrong link. Here is the one for for Windows Forms. It is even easier: http://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.protectsection.aspx
0
 

Author Comment

by:dimensionav
Comment Utility
Is possible use this code for a text file?, is just that I am having problems dealing with the app file
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
If you do it with a text file, all the job is yours.

The big advantage of the app.config file is that everything is handled automatically for you through the My.Settings object: writing, reading, differentiating between users if needed, encryption.

If you like to write 200 lines of code where 1 could do it, yes, you can do it in a text file.

What are your problems with the app file?
0
 

Author Comment

by:dimensionav
Comment Utility
Well considering 200 lines of code, I stay with app.config:

You are already helping on that: http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_27374923.html

Thanks!
0
 
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
Yes, I am already helping, and go back there. I was adding some details there when I received the ping telling me that you had made a comment.
0
 

Author Comment

by:dimensionav
Comment Utility
I read your link and I understand the syntaxis, I was reading the Overview and Walkthrough links too, but they only talk about web implementations so I have some questions of encryption in winapps:

1. In which section of my code must be integrated the encryption lines?
2. Should I decrypt the information each time that I need to read it and then encrypt it again?

Thanks!
0
 

Author Closing Comment

by:dimensionav
Comment Utility
1. In which section of my code must be integrated the encryption lines?
2. Should I decrypt the information each time that I need to read it and then encrypt it again?
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now