Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 14th, 2004, 12:02 AM
Registered User
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to duydp
Default Form authentication & multiple login pages

Hi,

I developed an ASP.NET website. The site has 2 parts: Main pages & Admin pages.
The admin pages are in a virtual directory naming Admin.
Now I want to make 2 login pages for 2 above parts.
I haved modfied the web.config as below:

<authentication mode="Forms">
      <forms name="MainSite" loginUrl="HomeLogin.aspx" protection="All" timeout="30" path="/"></forms>
    <forms name="Admin" loginUrl="Admin/Login.aspx" protection="All" timeout="30" path="Admin">
          <credentials passwordFormat="Clear">
            <user name="admin" password="admin"/>
        </credentials>
    </forms>
</authentication>

AND

...
<location path="Admin">
    <system.web>
        <authorization>
            <deny users="?" />
        </authorization>
    </system.web>
    </location>
...

But I can not login to the admin although I have entered the user name & pwd correctly.

How can I do that ? Thanks

 
Old September 14th, 2004, 07:20 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You need to search for roles based authentication.

Here's one article http://www.devhood.com/tutorials/tut...utorial_id=433

 
Old September 14th, 2004, 12:18 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If the admin pages are in a separate virtual directory, then you should be able to use another web.config file in that directory where you specify the authentication specifics for it separately from the main pages.





Similar Threads
Thread Thread Starter Forum Replies Last Post
forms authentication with two login pages janetb ASP.NET 2.0 Basics 2 March 25th, 2008 08:09 AM
Window & Form authentication for Webparts ayyub123 ASP.NET 2.0 Basics 0 May 29th, 2007 09:58 AM
form data in multiple pages cedwards Dreamweaver (all versions) 8 May 14th, 2005 08:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.