Thread.CurrentPrincipal HttpContext.Current.User
生活随笔
收集整理的這篇文章主要介紹了
Thread.CurrentPrincipal HttpContext.Current.User
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
據(jù)說要這樣寫才穩(wěn)妥
// This principal will flow throughout the request.
VoyagerPrincipal principal = new VoyagerPrincipal(yada, yada, yada);
// Attach the new principal object to the current HttpContext object
HttpContext.Current.User = principal;
// Make sure the Principal is in sync
System.Threading.Thread.CurrentPrincipal = System.Web.HttpContext.Current.User;
轉(zhuǎn)載于:https://www.cnblogs.com/teamleader/p/4042606.html
總結(jié)
以上是生活随笔為你收集整理的Thread.CurrentPrincipal HttpContext.Current.User的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DCC是什么?境外刷卡的坑要了解!
- 下一篇: Playground