|
-
Jul 18th, 2006, 07:57 AM
#1
Thread Starter
Member
FireFox problems ..
I am using FireFox version 1.5.0.4.
On page_load, I have a login control that validates user credentials and if successfull, creates two session variables as shown in the code below ..
if (auth.AuthenticatedUser(this.txtUserName.Text,this.txtPassword.Text) == true)
{
//Set non persistent cookie
Session["AuthorizedViewAll"] = auth.CheckSecurityDescriptor(this.txtUserName.Text);
Session["PeriodStartDate"] = DateTime.Now.AddDays(Convert.ToDouble(ConfigurationSettings.AppSettings["PeriodStartDateInterval"])).ToShortDateString();
Session["PeriodEndDate"] = DateTime.Now.ToShortDateString();
DataSet ds = auth.UserInfo(this.txtUserName.Text);
if (ds.Tables[0].Rows.Count > 0 )
{
Session["user_id"] = ds.Tables[0].Rows[0]["user_id"].ToString();
Session["user_name"] = this.txtUserName.Text;
Session["agent_id"] = "8" + this.txtUserName.Text;
Session["LoggedInProducerFName"] = ds.Tables[0].Rows[0]["first_name"].ToString();
Session["LoggedInProducerLName"] = ds.Tables[0].Rows[0]["last_name"].ToString();
Session["LoggedInProducerName"] = ds.Tables[0].Rows[0]["last_name"].ToString() + ", " + ds.Tables[0].Rows[0]["first_name"].ToString();
}
FormsAuthentication.SetAuthCookie(this.txtUserName.Text,false);
if (auth.ChangePasswordFlag(this.txtUserName.Text) == true)
{
Response.Redirect("~/pub/passwordChange.aspx");
}
//Check if this is a new login or a session time out login
string returnUrl = Request.QueryString["ReturnUrl"];
if (returnUrl==null)
//If it is a new login, redirect to the home page
Response.Redirect("~/pub/home.aspx");
else
//If it is a session time out login, redirect to the original page
FormsAuthentication.RedirectFromLoginPage(this.txtUserName.Text, false);
}
Then I am trying to access
Session["PeriodStartDate"] and
Session["PeriodEndDate"]
variables on another page (after login is completed) and it gives me "Object reference not set to an instance of an object." error. It works fine in IE, what the hell is wrong with FF???? Can someone help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|