Using the ConfigurationManager in a webcontrol.
Posted on 2008-10-06
I am using the following code to fetch all connectionstrings from web.config:
Dim ConnString As ConnectionStringSettings
For Each ConnString In System.Configuration.ConfigurationManager.ConnectionStrings()
This is working fine on codebehind of default.aspx, but as soon as I try to implement it in a webcontrol it does not fetch the connectionstrings anymore except for the 'standard' LocalSqlServer one.
Is this some security feature or should I address it differently from a webcontrol. Any insight would be great.