how to force to login.aspx first?

Discussion in 'ASP .Net Security' started by HockeyFan, Mar 2, 2006.

  1. HockeyFan

    HockeyFan Guest

    I thought that if in the web.config, I set

    <authentication mode="Windows">
    <forms name=".ASPXLOGINCOOKIE" loginUrl="Login.aspx" protection="All"
    timeout="30" path="/">
    <!-- protection="[All|None|Encryption|Validation]" -->
    </forms>
    </authentication>
    <authorization>
    <deny users="?" />
    </authorization>

    that this would force users to be authenticated, and that Login.aspx would
    come up first if not authenticated. And then after authentications, from the
    login.aspx.vb, you would do a RedirectFromLogin to take them to the page they
    wanted.
    Is there something that I need to do to get this to work?
    HockeyFan, Mar 2, 2006
    #1
    1. Advertising

  2. hi,

    yes - you have to set

    <authentication mode="Forms">


    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > I thought that if in the web.config, I set
    >
    > <authentication mode="Windows">
    > <forms name=".ASPXLOGINCOOKIE" loginUrl="Login.aspx"
    > protection="All"
    > timeout="30" path="/">
    > <!-- protection="[All|None|Encryption|Validation]" -->
    > </forms>
    > </authentication>
    > <authorization>
    > <deny users="?" />
    > </authorization>
    > that this would force users to be authenticated, and that Login.aspx
    > would
    > come up first if not authenticated. And then after authentications,
    > from the
    > login.aspx.vb, you would do a RedirectFromLogin to take them to the
    > page they
    > wanted.
    > Is there something that I need to do to get this to work?
    Dominick Baier [DevelopMentor], Mar 2, 2006
    #2
    1. Advertising

  3. HockeyFan

    Les Stockton Guest

    did that. not enough.

    "Dominick Baier [DevelopMentor]" wrote:

    > hi,
    >
    > yes - you have to set
    >
    > <authentication mode="Forms">
    >
    >
    > ---------------------------------------
    > Dominick Baier - DevelopMentor
    > http://www.leastprivilege.com
    >
    > > I thought that if in the web.config, I set
    > >
    > > <authentication mode="Windows">
    > > <forms name=".ASPXLOGINCOOKIE" loginUrl="Login.aspx"
    > > protection="All"
    > > timeout="30" path="/">
    > > <!-- protection="[All|None|Encryption|Validation]" -->
    > > </forms>
    > > </authentication>
    > > <authorization>
    > > <deny users="?" />
    > > </authorization>
    > > that this would force users to be authenticated, and that Login.aspx
    > > would
    > > come up first if not authenticated. And then after authentications,
    > > from the
    > > login.aspx.vb, you would do a RedirectFromLogin to take them to the
    > > page they
    > > wanted.
    > > Is there something that I need to do to get this to work?

    >
    >
    >
    Les Stockton, Mar 3, 2006
    #3
  4. sorry - this works for millions of apps :)

    maybe you have to describe your setup more thoroughly.

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > did that. not enough.
    >
    > "Dominick Baier [DevelopMentor]" wrote:
    >
    >> hi,
    >>
    >> yes - you have to set
    >>
    >> <authentication mode="Forms">
    >>
    >> ---------------------------------------
    >> Dominick Baier - DevelopMentor
    >> http://www.leastprivilege.com
    >>> I thought that if in the web.config, I set
    >>>
    >>> <authentication mode="Windows">
    >>> <forms name=".ASPXLOGINCOOKIE" loginUrl="Login.aspx"
    >>> protection="All"
    >>> timeout="30" path="/">
    >>> <!-- protection="[All|None|Encryption|Validation]" -->
    >>> </forms>
    >>> </authentication>
    >>> <authorization>
    >>> <deny users="?" />
    >>> </authorization>
    >>> that this would force users to be authenticated, and that Login.aspx
    >>> would
    >>> come up first if not authenticated. And then after authentications,
    >>> from the
    >>> login.aspx.vb, you would do a RedirectFromLogin to take them to the
    >>> page they
    >>> wanted.
    >>> Is there something that I need to do to get this to work?
    Dominick Baier [DevelopMentor], Mar 3, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SamIAm
    Replies:
    1
    Views:
    463
    Ed Gibbs
    Dec 4, 2003
  2. Grey

    Force to login page first

    Grey, May 21, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    635
    DalePres
    May 22, 2004
  3. frekster
    Replies:
    1
    Views:
    931
    frekster
    Sep 14, 2005
  4. vikramp
    Replies:
    2
    Views:
    1,252
    vikramp
    Oct 20, 2006
  5. pj
    Replies:
    2
    Views:
    1,938
Loading...

Share This Page