asp.net web api2 - Web API 2 does not set Thread.CurrentPrincipal in certain scenarios -


while trying debug why custom authentication filter not work in our in-memory integration tests, found there difference in way different subclasses of httprequestcontext set principal.

most of them ( owinhttprequestcontext, selfhosthttprequestcontext, webhosthttprequestcontext) set thread.principal this

webhosthttprequestcontext.cs:

public override iprincipal principal         {                         {                 return _contextbase.user;             }             set             {                 _contextbase.user = value;                 thread.currentprincipal = value;             }         } 

but not set @ (batchhttprequestcontext , requestbackedhttprequestcontext).

is design decision , need rewrite parts of application not use thread.principal) or bug needs be/will fixed?


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -