ASP .NET How to Get Logged In User Name?
-
To get the Logged In User Name in asp.net's codebehind file what steps should be taken? ie when the request from the client is passed to the server, the called page should be able to identify the logged on user's NT credentials on the machine from which the call came from... I have turned off Anonymous Access in IIS and checked Integrated Windows Authentication option there. I have in my web.config: <identity impersonate="true"/> <authentication mode="Windows" /> I tried this: Response.Write(System.Security.Princip… When i access the application through browser, it asks me for windows username/password. If i enter correct username/password, it shows me DomainName\UserName on the page which is correct but i dont want the login dialog to popup. What am I doing wrong? Appreciate any help on this. Zain.
-
Answer:
Hi You can try to do it with a simple javascript command: <asp:LoginName ID="Loginname1" FormatString="Welcome {0} !" runat="server"/> This should give you back your user name. Hope this helped! T
PuraniJe... at Yahoo! Answers Visit the source
Related Q & A:
- How can I allow user to create posts in website using ASP.NET?Best solution by Programmers
- How to Undo previous action in asp.net?Best solution by forums.asp.net
- How to Search using jQuery ASP.Net?Best solution by Stack Overflow
- How to get google drive account name?Best solution by Stack Overflow
- How do i change my user-name on here??Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.