473,386 Members | 1,720 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,386 software developers and data experts.

Stupid beginners question: Windows Username

my application needs to retrieve windows username - anon authentication is
OFF, auth mode in web.config is "windows".
I get machine name with
Dim ident As WindowsIdentity = WindowsIdentity.GetCurrent()
txtUser.Text = ident.Name

What do i need to find username?

TIA!!
Nov 19 '05 #1
2 1167
Once you use Windows authentication and deny anonymous access, you can get
Domain/username by

Context.User.Identity.Name

HTH

Elton Wang
el********@hotmail.com
"Child" wrote:
my application needs to retrieve windows username - anon authentication is
OFF, auth mode in web.config is "windows".
I get machine name with
Dim ident As WindowsIdentity = WindowsIdentity.GetCurrent()
txtUser.Text = ident.Name

What do i need to find username?

TIA!!

Nov 19 '05 #2
Try User.Identity.Name
-Souri

Nov 19 '05 #3

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

Similar topics

4
by: David Nikel | last post by:
I am attempting to create a login script. The following snippet of code: $query = "select * from auth where username='$username' and password=password('$password')"; $result =...
3
by: tjland | last post by:
This is my first version of this program, im kinda new to python and i was wondering if someone could help me with this. Their are some errors that i just cant find, and i want some advice on how...
18
by: John Salerno | last post by:
Hi all. I was hoping some of you could recommend a book or two that would help me get started with the basics of C#. I have a slight knowledge of programming, but basically I want to start out like...
1
by: Buddy Ackerman | last post by:
I'm trying to modify an ASCX written in C#. There is code embedded with the HTML and some lines start with <%#, what is the # for (is it like <%= in VB.NET)? So, I have a line that looks like...
3
by: Amil | last post by:
I must be missing something very simple. I've had a web site running for a long time (anonymous access). Web.config authentication is original (anyone gets in): <authentication mode="Windows"...
7
by: Nikolay Petrov | last post by:
Can I authenticate users of my ASP .NET apps, using their windows credentials, but using a SQL db. Let me explain a little more. I have an Windows XP station where i run my ASP .NET apps. I wish...
7
by: jason | last post by:
In the microsoft starter kit Time Tracker application, the data access layer code consist of three cs files. DataAccessHelper.cs DataAcess.cs SQLDataAccessLayer.cs DataAcccessHelper appears...
2
by: =?Utf-8?B?UmFrZXNo?= | last post by:
Hi, I have worked in Windows development for some time and want to learn ASP.Net - Web Application. Can some one redirect me to some site where I can find some good start up for beginners course...
2
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the...
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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.