ganders Posted April 12, 2005 Posted April 12, 2005 hi folks i'm developing a class library that is supposed to access to App.config an read/write some values. i'm allways getting an error "key is not defined...". Dim test As String Dim configurationAppSettings As System.Configuration.AppSettingsReader = New System.Configuration.AppSettingsReader test = CType(configurationAppSettings.GetValue("pw", GetType(System.String)), String) but using the same code inside a winform-application works perfect. so there must be some main diferences in accessing the config-file in class libraries or in winform-applications... can anybody help me out please? best regards georg Quote
IngisKahn Posted April 12, 2005 Posted April 12, 2005 Pssst: You should save user/run-time settings in Application Data/Isolated Storage, not in app.config :) Quote "Who is John Galt?"
Administrators PlausiblyDamp Posted April 12, 2005 Administrators Posted April 12, 2005 The app.config file is really designed for adminstrative control not end user settings. If you are running on a more secure OS (XP, win2k3 possibly win2k) a normal user should not have permissions to write to the 'program files' folder anyway. If you store settings under the user profile (directly or via Isolated Storage as mentioned by IngisKahn above) then they can take advantage of OS provided features (roaming profiles, separate user configs etc). Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ganders Posted April 12, 2005 Author Posted April 12, 2005 fine, but what exactly is 'isolated storage'? Quote
Mister E Posted April 12, 2005 Posted April 12, 2005 fine' date=' but what exactly is 'isolated storage'?[/quote']Just a location within a particular user's profile that is projected with the same level of security as their login. Other users of the system will not be able to access anything stored in another user's Isolated Storage. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.