473,385 Members | 1,320 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,385 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 1833
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...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.