I have assemblies that are accessed from both ASP.NET apps and from
windows services built with DOTNET.

What should I do in the second case?

In my windows service should I set thread::currentprincipal equal to my
user, then in my assemblies I can check either HttpContext::User or
Thread::CurrentPrincipal for a valid user?




>From: "Marsh, Drew" <[EMAIL PROTECTED]>
>Reply-To: dotnet discussion <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [DOTNET] how to pass httpcontext.user to another assembly
>Date: Fri, 26 Apr 2002 11:27:39 -0400
>
>Pete B [mailto:[EMAIL PROTECTED]] wrote:
>
> > I'd like to use forms authentication in my web app, and I'll
> > be replacing the intrinsic user with my own user object. my
> > web app references many assemblies, none of which have access
> > to the httpcontext. What is the best way pass my user along
> > to these other assemblies?
>
>When a method is called from the context of an ASP.NET thread then that
>method should be able to get the current HttpContext instance from
>HttpContext::Current.
>
>HTH,
>Drew
>
>You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
>subscribe to other DevelopMentor lists at http://discuss.develop.com.


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to