Wrox Programmer Forums
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 31st, 2006, 11:25 AM
Registered User
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default not redirecting to AccessDenied.aspx

I think I'm missing something...
I can't seem to override .net's default setting to redirect users to the login.aspx page.

I want users who have been denied access to be redirected to a accessdenied.aspx page, but they get the login.aspx page.

To set up the example, I've got the files: under an "admin" folder:
/admin/web.config .

In the /admin/web.config:

    <allow roles="Admin" />
    <deny users="*"  />
In the root web.config... :

<authentication mode="Forms">
        <forms defaultUrl="~/AccessDenied.aspx"  cookieless="AutoDetect" />
Why doesn't it redirect users to AccessDenied.aspx?

After looking at TBH examples, I don't see any difference in the way I have it set up. How do I redirect "?" users to: login.aspx and "*" users to: accessdenied.aspx?

Any help would be great!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirecting eldanh ASP.NET 1.0 and 1.1 Basics 3 August 9th, 2004 09:02 AM
HowTo Pass Form data from Page1.aspx to Page2.aspx dati ASP.NET 1.0 and 1.1 Basics 6 January 27th, 2004 06:57 AM
Redirecting to ASPX from ASP gurevle ASP.NET 1.0 and 1.1 Basics 3 July 16th, 2003 10:19 AM
Redirecting kend Classic ASP Basics 2 July 8th, 2003 04:15 AM

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