Where to store: User connection information?

Posted by TomTom on Stack Overflow See other posts from Stack Overflow or by TomTom
Published on 2010-04-26T08:43:59Z Indexed on 2010/04/26 8:53 UTC
Read the original article Hit count: 216

Filed under:
|

;) I am writing a .NET application wher ethe user connects to a given server. ALl information within the application is stored in the server. But I want / need to store the following information for the user:

  • The server he connected to last
  • The username he used to connect last (and no, no password, never ever).

Any idea where to store this best? the application config file is not sensible (user != admin, application.config is write protected for him). So, my options are:

  • In the registry. 2 keys under my own subkey.
  • In a sort of ini file, stored in the user's data directory (AppData). This would possibly also allow later expansion (into like saving more information, some of which may not fit into the registry).

Anyone a tip? Other alternatives? I tend so far to go for the AppData directory with my own subfolder - simply because it is a nice preparation for later to keep like a local copy of configuration etc.

© Stack Overflow or respective owner

Related posts about app.config

Related posts about .NET