Click here to Skip to main content
15,796,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an web application (wrote in VS) which is being hosted on a server. This web application is my Outlook add-in. I want to get the username logged in to the Outlook application. The plugin does not load when I try to use impersonation. By default, the username should not require an authorization login.
Can anyone assist with this?

What I have tried:

I have tried many methods but without success (disable anonymous authentication and enable windows authentication, User.Identity.Name etc.)
Updated 10-May-18 19:05pm
Richard MacCutchan 10-May-18 4:18am    
Why not just ask the user?

1 solution

Nothing you do on the server will send the name to the client. You need to discover it on the server, if that's somehow possible, and send it to the client. However, the server won't know who is using the page, unless the client told them. If you're looking for something from AD, or similar, then you've misunderstood the barrier between server and client. If the client has not logged in, they are not logged in to your site, and you have no way of knowing who they are. As Richard said, you will need to ask them
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900