Find Session Id on IE 7

Last post 11-12-2009 10:49 PM by RickNZ. 3 replies.

Sort Posts:

  • Find Session Id on IE 7

    11-12-2009, 12:09 PM
    • Member
      2 point Member
    • SPIF
    • Member since 07-07-2008, 7:49 PM
    • Posts 8

    i am using the Asp.net session and would like to know the sessionId for a particular session when using IE 7. i can see the sessionID in firefox through cookeis (ASP.NET_SessionId) but can't find the seesionId in IE nethier is any cookies file availabel , i don't want to programatticaly print any sessionId to UI but would like to be able to extract sessionId from cookies like in firefox.

  • Re: Find Session Id on IE 7

    11-12-2009, 12:54 PM
    • Member
      361 point Member
    • sanjeev87
    • Member since 09-22-2009, 12:39 PM
    • Bhubaneswar,Bangalore
    • Posts 70

    you can normally acess the browser session id through

    var sessionid = Session.SessionID;

    well the  reason for you cannot acess the session id is

    may be your cookies are not enabled

    you can enable your cookies by following the steps given in

    http://help.mybluelight.com/support/browser/msie7-cookie-enable.html

    (or check for tools->internet options->privacy tab ->settings to medium.)

    also for some browsers the session id changes for every postback

    for that you can set the sessionid in global.aspx page and acess accordingly in your page.

    refer the article http://forums.iis.net/t/1161122.aspx


    hope this helps

    sanjeev



    It feels good when someone really appreciate your efforts.please mark as answer if it has helped you.This can be helpful for those who face the same problem in future.
  • Re: Find Session Id on IE 7

    11-12-2009, 4:43 PM
    Answer
    • Participant
      766 point Participant
    • dotnetkode
    • Member since 01-22-2008, 9:47 PM
    • Herndon, VA
    • Posts 125

    I would recommend you to use Fiddler. you can watch your network traffic in Fiddler. You can see the request and response headers and therefore cookies too that are part of request and response. You can learn a lot using this tool. I highly recommend it.

    http://www.fiddler2.com/Fiddler2/


    ~ Remember To Mark The Posts Which Helped You As The ANSWER ~
  • Re: Find Session Id on IE 7

    11-12-2009, 10:49 PM
    Answer
    • Contributor
      5,224 point Contributor
    • RickNZ
    • Member since 01-01-2009, 3:43 AM
    • Nelson, New Zealand
    • Posts 864

    I agree with the previous post, that Fiddler can be very helpful.

    ASP.NET normally sets session cookies with the HttpOnly attribute, so their values can't be accessed from JavaScript.  The only way to get to them without a debugger or special browser support as in Firefox or Chrome, is either on the server or by observing the HTTP conversation.


Page 1 of 1 (4 items)