Tuesday, 15 July 2014

.net - Asp.NET Principal WebORB HttpHandler -


I have a Flex-Webber-Asp. Net Application While entering, there is an authentication handler that implements a WebORB interface:

  IPrincipal check credentials (string user name, string password, request message);  

So I made a principal and returned it. Weborb uses primaries to check authentication and authorization of remote method calls.

  var principals = new generic principal (new generic entity (user.id.ToString ()), new [] {"admin"}); Return Principal  

Now, at this point, if I check that is HttpContext.Current.User.Identity , this is a WindowsIdentity.

So far everything is fine. When later, a remote call is made via WebORB, then I log in by the user by calling:

  thread Currently the principal. Identity .name  

So I think WebORB ensures that the thread is identified with each remote call.

The problem is that when I say a HTTP handler (to retrieve an image), then I also try to get the ID logged in user with the thread. Current Principal. Recognise. Name , but that does not work, probably with WebPrint, Weborb has not been in action.

How do you solve it, so that I can get the login user ID in both cases? Put it in a session object? Can you change HttpContext.Current.User.Identity ? HttpContext.Current.User.Identity should not be the same as the thread. Current Principal. Identify .name ?

PS: The user is not in Active Directory.

No.


No comments:

Post a Comment