How to pass username of window authentication to web application.
-
Hi All, I have a web based application with Windows Authentication. I need to pass the user name of windows authenticated user to the web application say keep the username in session. How is this possible any help would be create. Thanks is Advance
Regards
-
Hi All, I have a web based application with Windows Authentication. I need to pass the user name of windows authenticated user to the web application say keep the username in session. How is this possible any help would be create. Thanks is Advance
Regards
Hi, In ASP.NET code, in Global.asax.vb file, Sub Session_start add the following lines: If User.Identity.IsAuthenticated Then Session("username") = User.Identity.Name End If Session("username") will keep the windows username in the session. Rgds, Saša
-
Hi All, I have a web based application with Windows Authentication. I need to pass the user name of windows authenticated user to the web application say keep the username in session. How is this possible any help would be create. Thanks is Advance
Regards
you can always get the current user details from the context object. No point storing them in a session variable. As for passing the user name to the web app, how do you thing windows authentication works? It does it for you.
If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles] [My Website]