Hello,
I found this post really interesting, but I have yet another doubt regarding access to previous page information.
I have a web application called from a corporate portal, and Ive been asked to extract the ID of the user logged in the corporate web, in order to perform a Silent log-in in the web application and thus the "Insert id and password" page doesnt appear.
The problem is, the web do not store the logged User ID in the Session variable, and when invoquing the Gateway that logs-in and calls the web application, it seems the Context from the previous page is not passed to the aspx class that implements the Gateway.
Ive tried using:
* Context.User.Identity.Name -> It returns NULL
* System.Security.Principal.WindowsIdentity.GetCurrent().Name -> It returns 'NT AUTHORITY\SYSTEM', no matter the logged user in the corporate web.
* HttpContext.Current.User.Identity.Name -> It returns NULL
Ive thought maybe accessing the previous page Context will help to retrieve the correct User ID, but when accessing it, it doesnt let me access the Context variable, and it seems "System" is not a valid atribute in "Page" class.
Maybe this line will do it?
Page prevPage = PreviousPage;
prevPage.User.Identity.Name
Changing the corporate web so it stores the User ID in the Session variable is not possible. Changing anything in the corporate web so things are a bit easier for me to implement is not possible :(
Is there any way of getting the User ID from the previous page?
Thanks in advance.