dude - please keep this in the users group. Unless you are pointing at a bug and supply with a test to back this up, or a fix.
So - my suggestion: a. please make sure the NllRef is not happening on your side of the code. perhaps .Context.Session["GBL_CURRENT_USER"] is null and can't be casted. try the "as" operator instead; b. please call base.Initialise() at the *beginning* of your override - its name suggests that it's doing some important initialization stuff, so you'd want MR to do that before your custom code c. once you are 100% sure that you're doing right, ask the question on the users-list. if you'd supply with the full stack-trace (with line numbers, etc.) it would be easier for people to help. and also please state the version of MR you're using. On Tue, May 19, 2009 at 8:57 AM, Kcube <[email protected]> wrote: > > not really, can any one help me. > > see this discussion > > http://groups.google.co.in/group/castle-project-users/browse_thread/thread/4b7da3dbb64c3b79 > > On May 18, 11:53 pm, Henry Conceição <[email protected]> > wrote: > > This is a question for the user mailing list. > > > > Cheers, > > Henry Conceição > > > > > > > > On Mon, May 18, 2009 at 9:12 AM, Kcube <[email protected]> wrote: > > > > > I have tried with Override the Initialize()-method in controller, but > > > it endedup in an exception > > > > > " > > > Override the Initialize()-method in your controller, there you should > > > have access to the http-context and the session, I think. " > > > > > protected override void Initialize() > > > { > > > UserProfile user = (UserProfile)this.Context.Session > > > ["GBL_CURRENT_USER"]; > > > IUserProfile objUserProfile = (UserProfile) > > > this.Context.Session["GBL_CURRENT_USER"]; > > > > > PropertyBag["usernameforemsa"] = "test User"; > > > base.Initialize(); > > > } > > > > > can any one help me ? > > > > > Thanks in Advance > > > Kcube > > > > > On May 18, 2:43 pm, Kcube <[email protected]> wrote: > > >> How get session variable inside layout. > > > > >> 1) I want to show the logged-in user name in layout page. I have tried > > >> to access the session variable inside the controller and set the > > >> value to property bag and then access it in layout page $username. > > > > >> 2) I have inherited the controller from a base page and in the base > > >> page constructor i tried to access session, but i am not able to > > >> access the session inside the constructor. > > > > >> 3) I am able to access the session inside filter, but property bag is > > >> not available inside filter. > > > > >> I am sure this is not proper mechanism to access the session variable > > >> in side layout. Can anyone help me please? > > > > >> Sorry for asking basic question. Thanks in advance- Hide quoted text - > > > > - Show quoted text - > > > -- Ken Egozi. http://www.kenegozi.com/blog http://www.delver.com http://www.musicglue.com http://www.castleproject.org http://www.gotfriends.co.il --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en -~----------~----~----~----~------~----~------~--~---
