Multiple login pages within the same ASP.Net application using Forms Authentication -


i have asp.net application makes use of forms authentication. have 2 folders "protected" administrators , registered users. want have 2 different login pages based on whether user trying access /admin/ or /members/ folder. based on understanding there can 1 login page configured in web.config when using forms based authentication?

at moment using code identify "mode" login page should display on page load of login page. below snippet of code convey approach using:

select case getrootfoldername(request.querystring("returnurl"))      case "members"           return pagemodes.merchants      case "admin"           return pagemodes.admin      case else           throw new exception("invalid protected folder") end select 

ideally have 2 separate login pages. possible?

you can have many login pages want, , style them see fit. underlying membership provider still return same authentication token (usually cookie) whatever login page used.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -