Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

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

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
dimensionav
Asked:
dimensionav
  • 5
  • 4
1 Solution
 
Jacques Bourgeois (James Burger)Commented:
You can encrypt portions of the configuration file described in you CodeProject article. See http://msdn.microsoft.com/en-us/library/ff647398.aspx.
0
 
dimensionavAuthor Commented:
I have read that your solution is for asp.net, Is it for win forms too?
0
 
Jacques Bourgeois (James Burger)Commented:
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
Technology Partners: 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!

 
dimensionavAuthor Commented:
Is possible use this code for a text file?, is just that I am having problems dealing with the app file
0
 
Jacques Bourgeois (James Burger)Commented:
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
 
dimensionavAuthor Commented:
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
 
Jacques Bourgeois (James Burger)Commented:
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
 
dimensionavAuthor Commented:
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
 
dimensionavAuthor Commented:
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

Technology Partners: 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!

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now