Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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 March 4th, 2009, 07:48 AM
Registered User
 
Join Date: Mar 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Membership and Role Management Challange

Pls I am having a challange redirecting to a custom page when a user is not authorized to access a folder using membership and role management. How do I fix this.
 
Old March 4th, 2009, 08:18 AM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Are you saying you want to redirect an unauthorized user to a page in a secured folder?

Not sure if that's wise, but anyway...

You can do this by using Server.Transfer rather than Response.Redirect. Server.Transfer performs no authentication or authorization checks, so you can send an unauthorized user anywhere you want.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
Membership and Role Providers with Access Database kanzeon4 ASP.NET 2.0 Professional 1 April 2nd, 2008 04:09 PM
cache membership/role values Maxxim ASP.NET 2.0 Professional 0 October 7th, 2007 05:09 AM
Membership and Role Management frosty ASP.NET 2.0 Basics 1 July 18th, 2006 12:46 AM
Need Help With Membership & Role Management Carl Grainger ASP.NET 2.0 Basics 2 January 13th, 2006 12:50 AM
Membership & Role Management - Ch16 Carl Grainger BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 January 6th, 2006 05:44 AM





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