Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. access ConfigurationManager.AppSettings

access ConfigurationManager.AppSettings

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hemant Thaker
    wrote on last edited by
    #1

    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

    A A 2 Replies Last reply
    0
    • H 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

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • H 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

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        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-->**

        www.abhisheksur.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups