Page view counter

login.aspx does not redirect to default.aspx in IE but works in FF

Last post 10-05-2007 3:27 PM by raghu1. 5 replies.

Sort Posts:

  • login.aspx does not redirect to default.aspx in IE but works in FF

    10-02-2007, 3:35 PM
    • Loading...
    • raghu1
    • Joined on 10-28-2005, 11:50 AM
    • Posts 409
    • Points 1,805

    I have a  strange problem:

    A simple virtual directory with  a login control in login.aspx and a default.aspx.

    The web.config  has AD connection string.

    When I access the folder using Fire Fox, it works normal: login.aspx --> input credentials --> default.aspx.

    But when I use IE: 6 or 7, the login does nothing: it just sits there doing nothing, I do not get the hour glass also ?? It is like there s/be something for the onClick event  for the button and there is nothing??

     

  • Re: login.aspx does not redirect to default.aspx in IE but works in FF

    10-02-2007, 10:49 PM
    • Loading...
    • s10n
    • Joined on 01-12-2007, 5:16 PM
    • El Salvador
    • Posts 402
    • Points 1,898

    It sounds like the problem is with IE not the website, have you tried it from another computer using IE?

  • Re: login.aspx does not redirect to default.aspx in IE but works in FF

    10-03-2007, 5:54 AM
    • Loading...
    • SreekanthReddy
    • Joined on 05-17-2007, 12:41 PM
    • Hyderabad (India)
    • Posts 123
    • Points 598

    Hi,

    Make sure that all the following conditions are met in your app:

    1. Make sure that default.aspx is set as start page.

    2. Make sure you BLogin_Click event looks like this and there is a Redirect to the start page as shown below

    protected void BLogin_Click(object sender, EventArgs e)

    {

    if (CheckCredentials(TUserID.Text, TPwd.Text))

    {

    //The following line is inportant to redirect it to the start page of your app.

    FormsAuthentication.RedirectFromLoginPage(TUserID.Text, true); //Navigates to the start page when username and password are corrtect

    }

    else

    {

    TPwd.Text =
    "";

    Msg.Text = "Username or password not found.";

    if(System.Convert.ToInt32(ViewState["Attempts"])>1)

    Response.Redirect("Denied.aspx");

    else

    {

    ViewState[
    "Attempts"]=System.Convert.ToInt32(ViewState["Attempts"])+1;

    if(System.Convert.ToInt32(ViewState["Attempts"])>=3)

    Response.Redirect("Denied.aspx");

    }

    }

    }

    3. Make sure your web.config'a section look like this:

    <authentication mode="Forms">

    <forms loginUrl="Login.aspx" protection="All" timeout="20">

    </authentication>

    I Hope this helps.

    Please remember to MARK AS ANSWER if my reply helped you.

  • Re: login.aspx does not redirect to default.aspx in IE but works in FF

    10-04-2007, 2:32 AM

    raghu1:

    The web.config  has AD connection string.

     

    Hi

    You mean this website authenticates user against Active Directory? Please correct me if any misunderstanding.

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: login.aspx does not redirect to default.aspx in IE but works in FF

    10-04-2007, 9:38 AM
    • Loading...
    • raghu1
    • Joined on 10-28-2005, 11:50 AM
    • Posts 409
    • Points 1,805

     Yes, I am authenticating against Active Directory.
     Very strange: the login pages has images/logos etc: nothing fancy: just some GIFs and a menu: hyper-linked. The menu links are broken: right now I am not worried about this as these would get fixed on production.

    I tried removing all the images/h-refs. It comes up. Not really sure if the broken links caused this. I would do more testing.

    Any suggestions ?

    thanks, 

  • Re: login.aspx does not redirect to default.aspx in IE but works in FF

    10-05-2007, 3:27 PM
    Answer
    • Loading...
    • raghu1
    • Joined on 10-28-2005, 11:50 AM
    • Posts 409
    • Points 1,805

     I think I found this. ASPX will allow only 1 form per page. My page had 2 forms: one for a search(generic site search) as part of standard header. I wanted this site to be with min maintenance, one login + 1 default. By just copying the header html to the login did not work for IE. Firefox does not care. So I had to make the header a control, registered the tag ... etc. It works now!.

     

Page 1 of 1 (6 items)