not enforcing authentication on some page

Discussion in 'ASP .Net' started by Abubakar, May 8, 2009.

  1. Abubakar

    Abubakar Guest

    Hi,

    I'm using forms authentication to enforce security. There is a login.aspx
    page that is sepcified as:

    <authentication mode="Forms">
    <forms loginUrl="login.aspx" protection="All">
    <credentials passwordFormat="Clear">
    <user name ="jack" password="jack"/>
    </credentials>
    </forms>
    </authentication>

    login page is of course accessible to the users without authentication, I
    want one more page to be accessible without authentication that will tell my
    ajax queries that the user right now is authenticated or not, so that in
    case the page is open for sometime and the session times out, I want the
    timer to tell the page after every few seconds, so that in case the session
    is not valid i'm going to redirect to the login page automatically.

    regards,

    ...ab
    Abubakar, May 8, 2009
    #1
    1. Advertising

  2. On May 8, 9:37 am, "Abubakar" <> wrote:
    > Hi,
    >
    > I'm using forms authentication to enforce security. There is a login.aspx
    > page that is sepcified as:
    >
    >     <authentication mode="Forms">
    >       <forms loginUrl="login.aspx" protection="All">
    >         <credentials passwordFormat="Clear">
    >           <user name ="jack" password="jack"/>
    >         </credentials>
    >       </forms>
    >     </authentication>
    >
    > login page is of course accessible to the users without authentication, I
    > want one more page to be accessible without authentication that will tell my
    > ajax queries that the user right now is authenticated or not, so that in
    > case the page is open for sometime and the session times out, I want the
    > timer to tell the page after every few seconds, so that in case the session
    > is not valid i'm going to redirect to the login page automatically.
    >
    > regards,
    >
    > ..ab


    In the configuration section (not in system.web) of the web.config
    file add

    <location path="default.aspx">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>

    where defaul.aspx is name of your page

    More about location: http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx
    Alexey Smirnov, May 8, 2009
    #2
    1. Advertising

  3. Abubakar

    Abubakar Guest

    ok thanks very much. I will try this.

    "Alexey Smirnov" <> wrote in message
    news:...
    On May 8, 9:37 am, "Abubakar" <> wrote:
    > Hi,
    >
    > I'm using forms authentication to enforce security. There is a login.aspx
    > page that is sepcified as:
    >
    > <authentication mode="Forms">
    > <forms loginUrl="login.aspx" protection="All">
    > <credentials passwordFormat="Clear">
    > <user name ="jack" password="jack"/>
    > </credentials>
    > </forms>
    > </authentication>
    >
    > login page is of course accessible to the users without authentication, I
    > want one more page to be accessible without authentication that will tell
    > my
    > ajax queries that the user right now is authenticated or not, so that in
    > case the page is open for sometime and the session times out, I want the
    > timer to tell the page after every few seconds, so that in case the
    > session
    > is not valid i'm going to redirect to the login page automatically.
    >
    > regards,
    >
    > ..ab


    In the configuration section (not in system.web) of the web.config
    file add

    <location path="default.aspx">
    <system.web>
    <authorization>
    <allow users="*" />
    </authorization>
    </system.web>
    </location>

    where defaul.aspx is name of your page

    More about location: http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx
    Abubakar, May 8, 2009
    #3
    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. David Johnson

    Enforcing single users

    David Johnson, Jun 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    767
    Kevin Spencer
    Jun 25, 2003
  2. Eric
    Replies:
    2
    Views:
    1,463
    Tommy
    Feb 13, 2004
  3. =?Utf-8?B?bWF2cmlja18xMDE=?=

    Forms Authentication Fails some times and not some times???

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    490
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 28, 2006
  4. Replies:
    2
    Views:
    349
    Soren Kuula
    Aug 24, 2006
  5. Barn
    Replies:
    0
    Views:
    139
Loading...

Share This Page