[Mono-devel-list] Re: [Mono-patches] mcs/class/System.Web/System.Web ChangeLog,1.210,1.211 HttpContext.cs,1.26,1.27

Torstensson, Patrik patrik.torstensson at intel.com
Wed Jun 9 18:58:49 EDT 2004


Time to help.. ;-)

MS does NOT set the principal when calling Context.User = Principal but it does when executing a new step in the execution pipeline in HttpApplication. So, setting the principal in an event changes the principal after the event is executed but before the page is executed.

This would be easy to fix in our implementation, we just need to track the principal in the state machine (same as culture info). Make sure that we set the principal from context.user when entering a thread  (saving current) and restore when leaving (to the saved).

Cheers,
 Patrik Torstensson 

> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com 
> [mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of 
> Sébastien Pouliot
> Sent: den 9 juni 2004 23:11
> To: Mono Development
> Subject: RE: [Mono-devel-list] Re: [Mono-patches] 
> mcs/class/System.Web/System.Web ChangeLog,1.210,1.211 
> HttpContext.cs,1.26,1.27
> 
> Hello,
> 
> I think this issue is a little more complex. See #59683 for 
> another sample.
> The authentication section of the web.config file may change 
> the behaviour of the property (which would explain the 
> different results).
> 
> Sebastien Pouliot
> http://pages.infinit.net/ctech/poupou.html
> 
> 
> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com
> [mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of 
> Gonzalo Paniagua Javier
> Sent: 9 juin 2004 16:16
> To: Pedro Martinez; Mono Development
> Subject: [Mono-devel-list] Re: [Mono-patches] 
> mcs/class/System.Web/System.Web ChangeLog,1.210,1.211
> HttpContext.cs,1.26,1.27
> 
> 
> El mié, 09-06-2004 a las 15:27, Pedro Martinez  escribió:
> > Update of /cvs/public/mcs/class/System.Web/System.Web
> > In directory mono-cvs.ximian.com:/tmp/cvs-serv30119
> >
> > Modified Files:
> > 	ChangeLog HttpContext.cs
> > Log Message:
> > 2004-06-09  Pedro Martínez Juliá  <yoros at wanadoo.es>
> >
> >     * HttpContext: User property returns its own "user" 
> value because
> >     the context can walk through different Threads. When 
> "User" property
> >     is changed, change "Thread.CurrentPrincipal" too.
> 
> This patch is wrong. Changing Context.User does not affect 
> the Thread.CurrentPrincipal, as you can see in the attached 
> simple test case. I've reverted it.
> 
> -Gonzalo
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 



More information about the Mono-devel-list mailing list