Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 August 19th, 2005, 05:18 PM
Registered User
 
Join Date: Aug 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Forms Authentication

 I'd like to know about the Forms Authentication in ASP.Net.
I have some forms including

1. login.aspx
2. default.aspx
3. admin_panel.aspx .....

I write the following code in web.config.

<authentication mode="Forms">
    <forms name="myproject" loginUrl="login.aspx" />
</authentication>

<authorization>
    <deny users="?" />
</authorization>

I only want to do forms authentication for admin pages.
I don't want default.aspx to be included in forms authentication.

How should I do??? Please help me.

Thanks,
TW

 
Old August 19th, 2005, 05:31 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can add a <location> tag in your web.config file, outside system.web but still inside configuration like this:

<location path="Admin">
    <system.web>
      <authorization>
        <allow roles="Administrator" />
        <deny users="*"/>
      </authorization>
    </system.web>
  </location>
</configuration>

This blocks the folder Admin for all users except for Administrators

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: 6 Minutes by Tricky (Track 5 from the album: Angels With Dirty Faces) What's This?
 
Old August 27th, 2005, 06:58 AM
Authorized User
 
Join Date: May 2005
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Friends,

Cud you tell me which authentication wud be better to use between Forms Authentication and Windows Authentication.

Regards,
Muskaan.

 
Old August 29th, 2005, 04:25 AM
Authorized User
 
Join Date: May 2005
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think no one is bothered to answer my questions........

anyways......thanx.......

regards,
muskaan.

 
Old August 31st, 2005, 01:13 AM
Authorized User
 
Join Date: May 2005
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I got the answer myself.........

Windows authentication is said to be of high priority over Forms Based Authentication........

anyways, thanks.....

Regards,
Muskaan.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms Authentication thetway Classic ASP Basics 1 August 18th, 2005 05:55 PM





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