Click here to Skip to main content
16,018,653 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my web.config file:
XML
<system.web>

     <authentication mode="Forms">
       <forms loginUrl="Staff Login.aspx" defaultUrl="~/Staff/Staff Home Page.aspx"></forms>
       </authentication>

 </system.web>

I want to add remain two login web forms such as Student,admin please help me
Posted
Comments
F-ES Sitecore 17-Mar-15 13:40pm    
How does the site know which one you want to use? All it knows is that you're not authenticated so should be directed to the login page, it can't make decisions about which page. Maybe you can have a common login page that does your logic to work out which login form to use and does a redirect to that form. If the decision is location based then look to use the <location> configuration item that lets you specify per-folder settings. Failing that you'll need to implement your own not-authenticated code using the events in the global.asax file that knows which login to direct the user too.

1 solution

As mentioned in the comments, you need a single login page for Forms Authentication. You can make different login pages but you'll need your users to go to different Urls, perhaps directly to the individual login pages.

Or, you have folders separate out your pages and add location tags in your web.config where each folder can have a separate authentication element in its web.config.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900