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. General Programming
  3. C#
  4. Accessing Session data outside webmethod

Accessing Session data outside webmethod

Scheduled Pinned Locked Moved C#
question
3 Posts 2 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.
  • A Offline
    A Offline
    AndreFratelli
    wrote on last edited by
    #1

    I'm currently writting a web service with sessions. I have a few methods like (getPrivileges) that need to read from Session[], but that I would not like to have them visible to outside requests. The question is: how do I read a Session[] value (like Session["id"], or whatever) on a method that is not a WebMethod? Best regards

    Fratelli

    A 1 Reply Last reply
    0
    • A AndreFratelli

      I'm currently writting a web service with sessions. I have a few methods like (getPrivileges) that need to read from Session[], but that I would not like to have them visible to outside requests. The question is: how do I read a Session[] value (like Session["id"], or whatever) on a method that is not a WebMethod? Best regards

      Fratelli

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

      AndreFratelli wrote:

      The question is: how do I read a Session[] value (like Session["id"], or whatever) on a method that is not a WebMethod?

      You mean those methods which are not exposed as Web Method ?

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      A 1 Reply Last reply
      0
      • A Abhijit Jana

        AndreFratelli wrote:

        The question is: how do I read a Session[] value (like Session["id"], or whatever) on a method that is not a WebMethod?

        You mean those methods which are not exposed as Web Method ?

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

        A Offline
        A Offline
        AndreFratelli
        wrote on last edited by
        #3

        Abhijit Jana wrote:

        You mean those methods which are not exposed as Web Method ?

        Exactly

        Fratelli

        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