Can I get windows user account on my web page?

G

Guest

Is it possible for me to get the actual windows user account that a user is
logged in on their computer as? If they are logged on and authenticated on
my network, can I get that username from my web page? I hope this makes
sense. Thanks.
 
P

Peter Rilling

Not if the website is anonymous. What authentication does is your website
using?
 
W

Winista

Is you are using windows auth for the site (as well as from IIS) and as
impersonation turned on then answer is yer.

HttpContext.Current.User
 
G

Guest

I'm using the new asp.net 2.0 membership stuff for security. So, yes, it is
anonymous.
 
P

Peter Rilling

Then I don't think so because IIS is not challenging the client for
credentials so it does not know who the person is.
 
R

Raymond

Yes, if you turn on Windows authentication in
IIS, and disable anonymous. Then you force network
login and can get the user account, but obviously
not the password. This is often done for Intranet
apps that need to be accessible from the Internet,
or when you need to restrict access to app functions
based on the logged-in user.
 
M

Mark Rae

Is it possible for me to get the actual windows user account that a user
is
logged in on their computer as? If they are logged on and authenticated
on
my network, can I get that username from my web page? I hope this makes
sense. Thanks.

If this is a local intranet site, then yes you can - almost certainly
dependent upon configuration.

If this is a public Internet site, then no you can't - almost certainly
under any circumstances.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top