session state id

Posted on 2011-05-04
Last Modified: 2012-08-13
i'm doing some studying of session states/cookies and have a question i can't find the answer

when a session id is created, how does that tie back to the sql suser_sname() (when using the sql out of the box session state db)?

the table dbo.ASPStateTempSession table has a SessionID field, but how do I use that field to capture the user id of the person executing the stored procedures in my database?

I'm just not seeing it.
Question by:gdspeare
    LVL 52

    Accepted Solution

    You need to do an update that field using <%Response.Write(Session.SessionID)%>

    UPDATE dbo.ASPStateTempSession
    SET SessionID = <%(Session.SessionID)%>,
    WHERE dbo.ASPStateTempSession.ID  = Some_Value

    Author Comment

    Actually my answer was that the IIS server that handles the session state id knows who the user is.  After i login to the application, the app begin to run under that user and no longer as the service.

    Author Closing Comment

    thank you for looking at the question.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
    Viewers will learn how the fundamental information of how to create a table.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now