Hi guys,
I'm developping a static class library that can be consumed by winforms apps and web apps.
In one of the methods I would like to identify the user without accessing to the httpcontext (that doesn' exists in a win app) and without passing any parameter to the method.
I thought to use the CurrentThread.GetHashCode() but a new thread is created every connection, not every session so every session of the same user have the same thread ID.
You have some idea about how to distinguish a session?
I can try/catch the access to the http context in order to distinguish a web app from a win app but is not very elegant.
Some help? Thanks
Stevie B. Gibson
I'm developping a static class library that can be consumed by winforms apps and web apps.
In one of the methods I would like to identify the user without accessing to the httpcontext (that doesn' exists in a win app) and without passing any parameter to the method.
I thought to use the CurrentThread.GetHashCode() but a new thread is created every connection, not every session so every session of the same user have the same thread ID.
You have some idea about how to distinguish a session?
I can try/catch the access to the http context in order to distinguish a web app from a win app but is not very elegant.
Some help? Thanks
Stevie B. Gibson