Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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 July 31st, 2004, 04:25 AM
Registered User
 
Join Date: Jul 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default error :(SitePrincipal)Context.User

I rebulid the web as book,and I use C#.
I changed all PhilePrincipal in this web to SitePrincipal.
When I write \Modules\Users\Admin\roles.aspx.

I use this transform Context.User to SitePrincipal
__________
SitePrincipal currentPrincipal = (SitePrincipal)Context.User;
----------
But,there is error when it be tansformed.

I check all code about it,but i cannot find what was wrong,so give me a hand please :)
Thanks!


 
Old July 31st, 2004, 07:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

What I've been noticing is that the Context.User isn't keeping the new reference to the SitePrincipal class. After the first time it does, but every subsequent time it is not.

Brian
 
Old August 1st, 2004, 03:26 AM
Registered User
 
Join Date: Jul 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I check the Context.User and it already has right data.
But,there is error when it be tansformed.

Hello bmains,what should I do then.

Thanks!


 
Old August 1st, 2004, 12:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

OK, then what is the specific error message? That will tell me more, as I can't determine what the issues are.

Thanks,

Brian
 
Old August 4th, 2004, 06:58 PM
Registered User
 
Join Date: Jul 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have resolved the problem,thanks!

 
Old August 5th, 2004, 07:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

What was the issue?





Similar Threads
Thread Thread Starter Forum Replies Last Post
(SitePrincipal)Context.User Philey BOOK: ASP.NET Website Programming Problem-Design-Solution 3 October 8th, 2004 05:38 PM
HTTPContext + SitePrincipal error (Wiggly Line) eureka BOOK: ASP.NET Website Programming Problem-Design-Solution 3 September 7th, 2004 09:15 PM
Please Help with Context.User Issue niketu BOOK: ASP.NET Website Programming Problem-Design-Solution 2 June 28th, 2004 08:29 PM
Context User davidroth BOOK: ASP.NET Website Programming Problem-Design-Solution 0 April 14th, 2004 12:49 AM





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