473,322 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

XP Login-ID authentication

Avi
Folks,

1 How can I retrieve the current-user's XP login-id and display it in a
win-form
2 How can I retireve that same login-id and display it in a web-form.

Many thanks,
Avi
av*******@hotmail.com
Nov 16 '05 #1
4 1830
Avi wrote:
1 How can I retrieve the current-user's XP login-id and display it in a
win-form
2 How can I retireve that same login-id and display it in a web-form.


For a winform:

System.Security.Principal.WindowsIdentity.GetCurre nt().Name

For a webform:

HttpContext.Current.User.Identity.Name

Lowell

Nov 16 '05 #2
The System.Security.Principal namespace defines a principal object that
represents the security context under which code is running.
System.Security.Principal.WindowsIdentity class represents a Windows user.

See:
http://msdn.microsoft.com/library/de...classtopic.asp

Shariq Khan
"Avi" <Av*@discussions.microsoft.com> wrote in message
news:CA**********************************@microsof t.com...
Folks,

1 How can I retrieve the current-user's XP login-id and display it in a
win-form
2 How can I retireve that same login-id and display it in a web-form.

Many thanks,
Avi
av*******@hotmail.com

Nov 16 '05 #3
Avi
Shariq,

Thank you it worked indeed.

Is there a way for me to authenticate the user once s/he types in their
password?

Cheers,
Avi
av*******@hotmail.com
"Shariq Khan" wrote:
The System.Security.Principal namespace defines a principal object that
represents the security context under which code is running.
System.Security.Principal.WindowsIdentity class represents a Windows user.

See:
http://msdn.microsoft.com/library/de...classtopic.asp

Shariq Khan
"Avi" <Av*@discussions.microsoft.com> wrote in message
news:CA**********************************@microsof t.com...
Folks,

1 How can I retrieve the current-user's XP login-id and display it in a
win-form
2 How can I retireve that same login-id and display it in a web-form.

Many thanks,
Avi
av*******@hotmail.com


Nov 16 '05 #4
Avi
Lowell,

Thank you it worked indeed.

Is there a way for me to authenticate the user once s/he types in their
password?

Cheers,
Avi
av*******@hotmail.com
"Lowell Heddings" wrote:
Avi wrote:
1 How can I retrieve the current-user's XP login-id and display it in a
win-form
2 How can I retireve that same login-id and display it in a web-form.


For a winform:

System.Security.Principal.WindowsIdentity.GetCurre nt().Name

For a webform:

HttpContext.Current.User.Identity.Name

Lowell

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: koolyio | last post by:
Hey, could you please tell me what is wrong with my login script. I just started learning php. CODE: login.php <? session_start(); header("Cache-Control: private"); ?>
5
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
1
by: Joe | last post by:
I have 3 servers server1: http://server1/login.asp, http://server1/page1.as server2: http://server2/login.asp, http://server2/page1.as server3: http://server3/login.asp, http://server3/page1.as ...
2
by: Gill Bates | last post by:
I'm trying to login to a banking site (https://www.providentconnection.com) using vb.net. I've tried many variations of WebClient and HttpWebRequest; none of which I've got to work. My latest...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
2
by: IdleBrain | last post by:
Hello All: I used a Login control to authenticate a user to login. The problem is that when I login with good username & password, the login view would say that the login was successful. But...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
0
by: daokfella | last post by:
I have a Login.aspx page that takes care of all my login procedures (validation, lockouts, password change requirements, password retrieval, etc.) It works like a charm. However, now I'd like a...
10
by: DavidPr | last post by:
When I logout as one user and log in under a different user, it opens with the last user's information. User 1 - Unsername: Davey Jones User 2 - Unsername: David Smith I log out from Davey...
13
by: Apostle | last post by:
Hi all, after thinking for sometimes, I thought it will be great opportunity to learn if I will start from scratch and build my own register/login system. Here is the thread that I will be posting...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.