473,385 Members | 1,553 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.

windows xp logon in C# program

Dear,

I want to know how you can use your logon under windows in a C# program (I
use windows xp pro). I want to make a form that has to be filled in and I
want to know who has filled in the form by using the logon under windows. Is
this possible and if it is yes how?

Thank you very much.
Nov 15 '05 #1
1 1155
Hi,

For starters, you could try to use the WindowsIdentity class for example:
WindowsIdentity myID = WindowsIdentity.GetCurrent();
Then use the name property to get the current user. That is for a desktop
appplication. For web apps use the Page object like this:
Page.User.Identity.Name
In both ways you will get the DOMAIN\user string. For the web app, you
will have to use integrated authentication in your webb app.

Cheers!
"Hugo Lefevre" <hu**********@belgacom.net> wrote in message
news:3f*********************@reader5.news.skynet.b e...
Dear,

I want to know how you can use your logon under windows in a C# program (I
use windows xp pro). I want to make a form that has to be filled in and I
want to know who has filled in the form by using the logon under windows. Is this possible and if it is yes how?

Thank you very much.

Nov 15 '05 #2

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

Similar topics

4
by: Reader | last post by:
I have an application that allows a user to enter a user name, user password, and the domain or machine name. From this information I would like to verify the user account and password is valid. ...
3
by: Steven Fox | last post by:
============================================================ About DB2 Administration Tools Environment ============================================================ DB2 administration tools level:...
7
by: Mullin Yu | last post by:
if i put the same code at the windows application or console, i can logon to the computer. but, if i put the same code at the windows service and start it, i still can't logon to the machine. ...
8
by: Nils Magnus Englund | last post by:
Hello, I am having trouble using Integrated Windows Authentication between our intranet server and our database server, both of which are on our local domain. Windows authentication works for...
17
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
6
by: sergiockgoh82 | last post by:
Recently my task is developing a program to keep track the user logon. User after successed login on from the Windows logon, he will come to this program to provide login details on the 2nd...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Description NOTE- If you are unfamiliar with the concept of autoruns, then read "Windows Autorun FAQs: Overview". Que-1: How can I safely remove or edit the autorun...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
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
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.