Forms Authentication in ASP.NET and C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmrhema
    Contributor
    • Jan 2007
    • 375

    Forms Authentication in ASP.NET and C#

    Hi,
    I studied abt windows form authentication in web config,
    Now I have a database of username and passwords.
    I will just check using an sql stored procedure, if matches then I will allow the user to access the page, else I dont.

    Even the form authentication also does the same.

    Can anyone let me know wats the difference between the above two

    regards
    cmrhema
  • adityakoppolu
    New Member
    • Sep 2008
    • 17

    #2
    Even if you are using form authentication also you need to verify the userid and password by calling sql query only.

    By form authentication if you copy the middle page URL of application in another browser it will again redirect to the login page it wont support to allow that page until you it will get the login credentials.

    But in another case through checking sql-query if we past the middle page URL of the application we can get immediately that page information.
    Normally this will be handle with sessions. in login page collects the session with some value when its a valid login and checks that session in each and every page of the application. If session is empty redirect it to login page else allows that page to show.

    Comment

    • adityakoppolu
      New Member
      • Sep 2008
      • 17

      #3
      Addition to the above reply insted of doing session check in all the pages normally it will be checked in Masterpage if it is used, even for form authenticaton validity alsoi it will be checked in master page.

      Comment

      Working...