据说要这样写才稳妥

// 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;

相关文章:

猜你喜欢
  • 2021-12-31
  • 2022-01-21
相关资源
相似解决方案