asp.net - is reading web.config from a class insecure? -
i wanted way of getting settings without having them every time made simple class. ex:
public class customconfigsettings { public customconfigsettings() { // default constructor. } public string mysetting { { return configurationmanager.appsettings["mysetting"]; } } }
it works fine, feels might insecure (for reason can't put finger on). appreciate feedback on security issues, if any, , possible alternatives. (webforms; .net 3.5).
this not insecure itself. security depends on access class , if class permits changes configurations, if access code, can change settings.