access ConfigurationManager.AppSettings
-
Hi.. I want to access ConfigurationManager.AppSettings["xxx"] value to session_end event of global.asx. Is it possible ? As I am not getting the value there. thanks
By: Hemant Thaker
-
Hi.. I want to access ConfigurationManager.AppSettings["xxx"] value to session_end event of global.asx. Is it possible ? As I am not getting the value there. thanks
By: Hemant Thaker
Hemant Thaker wrote:
Is it possible ?
Yes. What problem are you getting ? Below is my web.config entry.
Here is my Session_End Code.
void Session_End(object sender, EventArgs e)
{
string myval = ConfigurationManager.AppSettings["k"].ToString();
}On
Session_End
, I am getting value myval=123.Cheers ! Abhijit Jana | MVP Web Site : abhijitjana.net | Follow Me @ twitter Read my Latest Article :Mastering Debugging in VS 2010
-
Hi.. I want to access ConfigurationManager.AppSettings["xxx"] value to session_end event of global.asx. Is it possible ? As I am not getting the value there. thanks
By: Hemant Thaker
Session end has nothing to deal with ConfigurationManager. ConfigurationManageris a static class that Reads different section of ASP.NET config file and gives you the data. I think it should be accessible from anywhere, even from Application_end. :cool: There might be some other issue with it, it is nothing to deal ConfigurationManager.
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
Visit My Website-->**