Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO 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 31st, 2005, 08:26 AM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sumathra
Default admin module does not work

if ( ((PhilePrincipal)Context.User).HasPermission( (int)AccountsPermissions.UpdateRoles ))[/red]


I downloaded ASP.NET code in Wrox website.

but admin module did not work.above line error(PhilePrincipal class) to be indicated.
give some suggession.

sumathra
 
Old January 31st, 2005, 10:41 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Are you retaining the User property of the context class? If you assign it to the User property (your custom Principal object), it isn't retained automatically for you. You have to retain it yourself.

Brian
 
Old February 1st, 2005, 01:21 AM
Registered User
 
Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sumathra
Default

Quote:
quote:Originally posted by bmains
 Are you retaining the User property of the context class? If you assign it to the User property (your custom Principal object), it isn't retained automatically for you. You have to retain it yourself.

Brian

explain how to assign user property.
give some example and where to assign this property.


sumathra
 
Old February 1st, 2005, 08:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

If your ASP.NET pages inherit from a custom class, not directly from System.Web.UI.Page, but instead (for example), MyPageLayout. Override the User property in MyPageLayout that loads the User info and returns your custom object.

Or implement a custom HTTP Module for authentication.
http://msdn.microsoft.com/library/de...SecNetch08.asp
http://www.codeproject.com/aspnet/As...asp?print=true

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
CMS - admin login does not work peppie BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 October 20th, 2007 08:46 AM
admin login mujnu PHP How-To 0 February 5th, 2006 08:03 AM
admin youyou_hym Dreamweaver (all versions) 1 February 15th, 2005 03:03 AM
VB module fails to work when data > 170,000 tuples andy_routledge Access VBA 2 August 6th, 2003 06:59 AM
Admin Dan Jallits Forum and Wrox.com Feedback 1 June 6th, 2003 10:36 AM





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