I have an issue where I have an ASP.Net app that uses a Session varible to track who is logged in, is some how swapping the object that is in the varible with a different one in memory. At least that is what the evendence is showing right now. Here is the steps and the code
First, when a user logs in, we set an object into a Session Varible
oUserDB.Login is returning a class with the properties set for a user.VB Code:
Dim oSocialWorker As SocialWorker = oUserDB.Login(cmbUser.Text.Trim.ToString, txtPassword.Text.Trim.ToString) Session("SocialWorker") = oSocialWorker
This part works, because the next page (Referrals.aspx) uses the object in the Page_Load without issue. That code is below.
The lblSocialWorkerInfo is loaded correctlyVB Code:
If Not IsPostBack Then Dim oSocialWorker As SocialWorker = Session("SocialWorker") lblSocialWorkerInfo.Text = "Referrals for " & oSocialWorker.LastName & ", " _ & oSocialWorker.FirstName & " in the " & oSocialWorker.LC_Name
Then the user clicks on a button to go to another page. The code behind the botton is below.
Then, the user clicks on an another link to go back to the first pageVB Code:
Response.Redirect(Request.ApplicationPath + "/Interventions.aspx", True)
Now when this code executes again,VB Code:
Response.Redirect(Request.ApplicationPath + "/Referrals.aspx", True)
The lblSocialWorkerInto label now has a different persons name.VB Code:
Dim oSocialWorker As SocialWorker = Session("SocialWorker") lblSocialWorkerInfo.Text = "Referrals for " & oSocialWorker.LastName & ", " _ & oSocialWorker.FirstName & " in the " & oSocialWorker.LC_Name
We have tried and tried to recreate this on our development server and can not.
Also, we are using "Cookieless=false" setup.
Any ideas???
Thanks




Reply With Quote