Hi,
I am facing the following problem while using my version of SessionHelper class in ASP.NET.
The scenario is as follows:
I have my version of SessionHelper Class where I store many of my session variables. One of them is UserID.
Now there is a MyCommon.vb module file where I have a global instance of this SessionHelper class. Again, in the module file I have few methods which I call from my main program.
Now the problem is that, if I declare a new instance of my session variable inside the methods of module file, then when I call say any method from my main program, then the value of my UserID returned from this local instance of SessionHelper classis, is the proper value of the required User.
But if I do not declare a local copy and try to get the value of UserID from the global instance of SessionHelper class which was declare in the module, then sometimes I get garbage values of UserID i.e. I get certain UserIDs with which I had previously logged in.
This question may not be very clear. If so, let me know, I will try to provide more details.
Thanks
Pawan.
I am facing the following problem while using my version of SessionHelper class in ASP.NET.
The scenario is as follows:
I have my version of SessionHelper Class where I store many of my session variables. One of them is UserID.
Now there is a MyCommon.vb module file where I have a global instance of this SessionHelper class. Again, in the module file I have few methods which I call from my main program.
Now the problem is that, if I declare a new instance of my session variable inside the methods of module file, then when I call say any method from my main program, then the value of my UserID returned from this local instance of SessionHelper classis, is the proper value of the required User.
But if I do not declare a local copy and try to get the value of UserID from the global instance of SessionHelper class which was declare in the module, then sometimes I get garbage values of UserID i.e. I get certain UserIDs with which I had previously logged in.
This question may not be very clear. If so, let me know, I will try to provide more details.
Thanks
Pawan.
Comment