ASP.NET Forms Authentication, Part 2
Subject:   Force AD Login in from all pages.
Date:   2005-09-15 10:07:12
From:   tward3017
Can some give me an example of how in I can force a user who attempts to browse a page to be directed to the AD Login page.
Example: http://sitename/login.aspx
User tries to get to http://sitename/subdir/page.aspx I need them to be redirected to the login page and maintain authentication to any page after successfully authentication other wise they constantly get the loginpage.aspx.
Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Force AD Login in from all pages.
    2005-09-19 23:24:41  najeemmillyas [View]


    You may set a session variable immediately after login success.Also you may chech the session set or not while a page is accessing.If session session not set then redirect the user to login page

    Sample code


    'after athentication success


    'under page load event of protected page

    if (Session("sess_var")="")


    End if

    place the above code in any page u need to protect.