D
delerium
Hi there,
Working on a project porting from dotnet 1.1 to 2.0
Basically I've setup a background thread which performs a login
creating a custom principal which we want to copy back to our main
thread.
In dotnet 1 we would simply assign the Thread.CurrentPrincipal in the
worker completed event handler, getting the custom principal from the
work completed event args. This worked fine (using WinFormsEx to
mimick the behaviour of the net 2.0 background worker).
the problem we are having in net 2.0 is that when we set the
Thread.CurrentPrincipal in the work completed event handler, it is
lost with the next line of code that executes in the main thread (we
blocked this using a messagebox, when you click ok, the main thread
continues but the principal identity is lost).
I've tried even using the WinFormsEx instead of net 2.0's background
worker but the behaviour is the same.
Anyone have any ideas?
Thanks
Paul
Working on a project porting from dotnet 1.1 to 2.0
Basically I've setup a background thread which performs a login
creating a custom principal which we want to copy back to our main
thread.
In dotnet 1 we would simply assign the Thread.CurrentPrincipal in the
worker completed event handler, getting the custom principal from the
work completed event args. This worked fine (using WinFormsEx to
mimick the behaviour of the net 2.0 background worker).
the problem we are having in net 2.0 is that when we set the
Thread.CurrentPrincipal in the work completed event handler, it is
lost with the next line of code that executes in the main thread (we
blocked this using a messagebox, when you click ok, the main thread
continues but the principal identity is lost).
I've tried even using the WinFormsEx instead of net 2.0's background
worker but the behaviour is the same.
Anyone have any ideas?
Thanks
Paul