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 January 25th, 2004, 10:36 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 146
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aadz5
Default Forms Authentication

Hi guys,

I want users to be directed to the login page but if they dont have a login, or dont want to login they can still use the facilities of the site. When I use my web.config file, if the person is not authenticated for the site they cannot go anywhere. Can I use web.config for forms authentication, and if the user is not authenticated they can still use facilities of the site??

Any ideas??




Adz - The World is not enough
__________________
Adz - Learning The J2EE Ways.
 
Old January 25th, 2004, 05:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Yes you can use Forms Authentication.

Have a folder like this:

mysecurefolder/

and put a web config file that has <authorization> <deny users="?" /> </authorization>

Then only authenticated users can access anything in the secure folder.

 
Old January 26th, 2004, 11:28 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This threads begs me to ask the question:
If the pages are allowed to be accessed anonymously, then why have a login at all?

If you don't want to actually protect your pages, then don't bother with any kind of ASP.net authentication scheme. Just build in your login capability and do what you need with it. There's no point in configuring forms authentication if you aren't going to use it.

What do you mean by "directed to the login page"? From where? You could certainly set up your site to have the login page as the default page. Again, forms authentication won't help you there. Unless you are denying anonymous users, .net won't redirect the browser to the login page for unauthenticated users.

Peter
------------------------------------------------------
Work smarter, not harder.





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.