I have writen an custom Error Logging HttpModule and successifully added it to the web.config file. the trouble is that I can not seem to pass variables (Keys) to the module. In this case it is a database connection string.
This is the code I' using in the web.config file:
<configSections>
<section name="ErrorLog" type="ErrorLog.ErrorLog,ErrorLog"/>
</configSections>
<ErrorLog>
<add key="ExtendedReport" value="True" />
<add key="ErrConnectionString" value="My Connection String" />
</ErrorLog>
Here is the code Im using in my HttpModule:
constr=System.Configuration.ConfigurationSettings.AppSettings("ErrConnectionString")
I'm not getting any errors, but I'm not getting any values either.
Any help would be greatly appreciated!!!
Thanks!
Bob
This is the code I' using in the web.config file:
<configSections>
<section name="ErrorLog" type="ErrorLog.ErrorLog,ErrorLog"/>
</configSections>
<ErrorLog>
<add key="ExtendedReport" value="True" />
<add key="ErrConnectionString" value="My Connection String" />
</ErrorLog>
Here is the code Im using in my HttpModule:
constr=System.Configuration.ConfigurationSettings.AppSettings("ErrConnectionString")
I'm not getting any errors, but I'm not getting any values either.
Any help would be greatly appreciated!!!
Thanks!
Bob