M
Madhu Gopinathan
Hi,
I am setting System.Threading.Thread.CurrentPrincipal to a Windows
pricipal before I go ahead call methods to process, sometimes cross
assembly.
The problem I am facing is that intermittently the WindowsPrincipal
object within seems to be garbage collected because I get "Handle is
invalid" sometimes.I tried setting GC.KeepAlive
(System.Threading.Thread.CurrentPrincipal) post setting the value in
CurrentPrincipal variable. It did not help the cause.
Is there something amiss in what I am doing here?
Thanks in advance,
Madhu
I am setting System.Threading.Thread.CurrentPrincipal to a Windows
pricipal before I go ahead call methods to process, sometimes cross
assembly.
The problem I am facing is that intermittently the WindowsPrincipal
object within seems to be garbage collected because I get "Handle is
invalid" sometimes.I tried setting GC.KeepAlive
(System.Threading.Thread.CurrentPrincipal) post setting the value in
CurrentPrincipal variable. It did not help the cause.
Is there something amiss in what I am doing here?
Thanks in advance,
Madhu