HttpContext.Current.User vs. Thread.CurrentPrincipal

M

Michael Ames

How are HttpConext.Current.User and Thread.CurrentPrincipal different?

It seems that they can be set differently in different places. Why would
one use one and not the other?

Thanks,

Michael
 
R

Ram Sunkara [msft]

Use HttpConext.Current.User for all web (ASPX/ASMX) applications.

Use Thread.CurrentPrincipal for all other applications like winForms,
console and windows service applications.

ASP.NET support various authentication schemes in additions to windows
authentication.



Use How are HttpConext.Current.User for web application, more precisly
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top