c# - Should I cache a WindowsIdentity object in a MVC app? If so, what's the best way to do it? -


i'm generating windowsidentity object in mvc application , i'd ideally cache won't hitting ad on every request; problem exception: "safe handle has been closed"

i've read somewhere error pops because after request ends, iis closes handle of thread principal (in case windows principal instantiate using cached windows identity).

cutting point, should caching object? caching token better idea? or should give on idea of caching of those?

thanks in advance!

if using logonuser create windows tokens - there optimization , caching going on in windows kernel.

i stay away trying optimize that, , noticed, should leave handle management os.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -