create unique hash per browser and page
I am creating a web application in c#.
I want to create a unique ide开发者_运维百科ntifier for the current user on to be used on the current page. This idenitfier is just for this page and this users session. So it will vary per user, browser etc. I have an id for the user that I can use but also want to use a unique identifier for the browser eg session id. So I will create a hash based on user id, ip address, page identifier and browser identifier.
Is there a value from the user httprequest object that I could include in the generation of the hash?
REMOTE_ADDR
will give you the IP
HTTP_USER_AGENT
will give you the browser
SCRIPT_NAME
will give you the current script running (page)
Just access those values using the Request.ServerVariables
collection
精彩评论