asp.net HTTP Handler

nxnvietnam

New Member
I need some help on a problem that's been troubling me for awhile now on an application at work.Essential I am using an HTTP handler written VB.net that seems to exibit some odd behavior from time to time. Below is a sample of the piece of code where I see the error. I've simplified the variables since some of them hold company data\[code\]Public Class wmfImplements IHttpHandler, IRequiresSessionStatePublic ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get ' Return false in case your Managed Handler cannot be reused for another request. ' Usually this would be false in case you have some state information preserved per request. Return True End GetEnd PropertyPrivate EmployeeID As stringPrivate Category As stringPublic Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest'' handles user session and writes to database using the private variables above.End Sub\[/code\]This is mostly pseudo code (so ignore any best practices), but I've had issues where from time to time is seems or appears that the private variables in this class when populated from session data (or any data that may differ from each instantiation) act like shared (static) variables.Do any of you folks see any problem with putting private variables like this in an HTTP handler that will be hit by multiple users having concurrency issues? I've actually had this class with a basic logger show a variable retain the value from a user who hit the site and created an instance of this class. Is that possible with the way it's setup or am I imagining this?Thanks for any insight
 
Back
Top