Hi,
In version 3.0 I could do this:
public Task RunImportAsync(CancellationToken cancellationToken)
 {
 myCancellationToken = cancellationToken;
task = Task.Run(() =>
 {
 DoImport();
 });
 return task;
 }
In version 3.1 I must do this to preserve the logged in user for the code inside Task.Run:
public Task RunImportAsync(CancellationToken cancellationToken)
 {
 var impersonatedUser = Csla.ApplicationContext.User;
 myCancellationToken = cancellationToken;
task = Task.Run(() =>
 {
 Csla.ApplicationContext.User = impersonatedUser;
 DoImport();
 });
 return task;
 }
What do you think? Is there a setting or something I can do to make it work as before?
Best regards,
Wilfred
User impersonation is a system feature, not a Wisej issue. If you have a small runnable sample that shows a Wisej related issue we can look at this further.
Please login first to submit.
