Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. form authentication

form authentication

Scheduled Pinned Locked Moved ASP.NET
securityquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srinandan
    wrote on last edited by
    #1

    Hi All, I have partially completed my project using the form authentication. I have used a single login form for two type of user says "Producer" and "Dealer". and set the web.config as : Once the user will logged he will redirect to "DecideLogin.aspx" where i am redirect to suitable directory along user role(Dealer,Producer) above is all about which i have done Requirement: I have need to keep the layout "Login.aspx" suitable to both but the content and menus are different for both the users.so i want to keep the two different login form for both. suppose i will keep the to two login form, then how could i manage the loginurl once the session will exprired. Once the session will expire on which page user will redirect and how? Thanks in advance, Sri..

    S E 2 Replies Last reply
    0
    • S srinandan

      Hi All, I have partially completed my project using the form authentication. I have used a single login form for two type of user says "Producer" and "Dealer". and set the web.config as : Once the user will logged he will redirect to "DecideLogin.aspx" where i am redirect to suitable directory along user role(Dealer,Producer) above is all about which i have done Requirement: I have need to keep the layout "Login.aspx" suitable to both but the content and menus are different for both the users.so i want to keep the two different login form for both. suppose i will keep the to two login form, then how could i manage the loginurl once the session will exprired. Once the session will expire on which page user will redirect and how? Thanks in advance, Sri..

      S Offline
      S Offline
      Sajid A
      wrote on last edited by
      #2

      Hi Dear, I am just suggesting you, not to make two login page, if you have such type of requirement then make two master pages(set user controls and menus accordingly) and in runtime try to change the master page accoring to user type (Dealer , Producer). Sample code is just for yr reference Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit If userType = "Dealer" Then Me.MasterPageFile = "Dealer.master" Else 'Default for for Producer Me.MasterPageFile = "Producer.master" End If End Sub You can only change master page in Page_PreInit Event. Cheers :rolleyes:

      Sajid A.

      1 Reply Last reply
      0
      • S srinandan

        Hi All, I have partially completed my project using the form authentication. I have used a single login form for two type of user says "Producer" and "Dealer". and set the web.config as : Once the user will logged he will redirect to "DecideLogin.aspx" where i am redirect to suitable directory along user role(Dealer,Producer) above is all about which i have done Requirement: I have need to keep the layout "Login.aspx" suitable to both but the content and menus are different for both the users.so i want to keep the two different login form for both. suppose i will keep the to two login form, then how could i manage the loginurl once the session will exprired. Once the session will expire on which page user will redirect and how? Thanks in advance, Sri..

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        Like the above post I agree It would be better just to change the styles through the code rather then have to different login pages. Then you can just use one tag in the web config file and just change the style depending on which user is logged in

        We are not a Code Charity

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups