Getting LogOn Name from Client

  • Thread starter Thread starter Jennifer
  • Start date Start date
J

Jennifer

I've created this ASP page with VB as the code behind. As part of the
security there will only be a few people who should have access to the
page. I was planning on a log-in screen, and then validate the log-in
name and password against what is stored in a database.

My boss thinks that I should be able to get the user name that the
person logs onto their computer with. I know how to do that in VB 6,
but not in .Net and most especially not through an internet
application. Can that be done? And if so, could someone either tell
me how, or point me in the direction of a tutorial?

Thanks!
Jennifer
 
Hi,

Take a look at the different forms authenication on a web form and
the forms identity class.

http://msdn.microsoft.com/library/d...mwebsecurityformsauthenticationclasstopic.asp

http://msdn.microsoft.com/library/d...ritywindowsauthenticationmoduleclasstopic.asp

http://msdn.microsoft.com/library/d...itypassportauthenticationmoduleclasstopic.asp

http://msdn.microsoft.com/library/d...fsystemwebsecurityformsidentityclasstopic.asp

Ken
-------------------
I've created this ASP page with VB as the code behind. As part of the
security there will only be a few people who should have access to the
page. I was planning on a log-in screen, and then validate the log-in
name and password against what is stored in a database.

My boss thinks that I should be able to get the user name that the
person logs onto their computer with. I know how to do that in VB 6,
but not in .Net and most especially not through an internet
application. Can that be done? And if so, could someone either tell
me how, or point me in the direction of a tutorial?

Thanks!
Jennifer
 
August 8, 2004

I don't follow URL, so I don't know whether Ken answered
your question. You just have to set in your Web.config file, the
<authenication> element's "mode" setting to "Windows". Then
you can use from your code: User.Identity.Name to retrieve the
name of the user on the client's computer. The clients username
on his/her computer can change, especially if it is a home
computer. I hope this answers your question!


Joseph MCP
 

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

Back
Top