Solved

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

Posted on 2011-09-30
9
303 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
ID: 36894425
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
ID: 36894457
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
ID: 36894494
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dimensionav
ID: 36895020
Is possible use this code for a text file?, is just that I am having problems dealing with the app file
0
 
LVL 40
ID: 36895388
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
ID: 36897917
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
ID: 36897969
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
ID: 36903685
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
ID: 37137776
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.NET 2008 Winforms Signing 13 42
VB.net -  GroupBox / Panel DataBinding and behavior 3 23
Data organization issue 7 37
ModalPopup  question 22 38
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 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