|
-
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?
-
Jul 18th, 2006, 12:25 PM
#2
Re: FireFox problems ..
Cookies disabled? Is the application expecting Windows authentication in addition to the basic authentication/forms authentication? (Check IIS)
-
Jul 18th, 2006, 07:34 PM
#3
Thread Starter
Member
Re: FireFox problems ..
Thanks Mate !!
But it was kinda stupid on my behalf in the end.
Application had two pages, login.aspx and loginNS.aspx. I had added session variables in login.aspx, i did not realize application uses loginNS.aspx in case the browser is anything other than IE. (NS,FF etc ..) We got this app from a client and did not know this is how it worked.
I added session variables in loginNS.aspx and everything worked fine.
-
Jul 19th, 2006, 02:48 AM
#4
Re: FireFox problems ..
Tsk, tsk, I expected worse than that from you.
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
|