473,671 Members | 2,194 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1194
Once you use Windows authentication and deny anonymous access, you can get
Domain/username by

Context.User.Id entity.Name

HTH

Elton Wang
el********@hotm ail.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.N ame
-Souri

Nov 19 '05 #3

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

Similar topics

4
2101
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 = mysql_query($query, $db_conn); $num = mysql_num_rows($result); echo $num;
3
3513
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 to do some of these things easier. Thanx for the help! ---------------------------------------------------------------------------- from time import sleep def Sendfile(password, username): outfile = file(username, "w") outfile.write(password)
18
13918
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 I know nothing, so I don't skip anything. I considered Microsoft Visual C# .NET Step by Step 2003 by Sharp/Jagger, but then I read a few reviews and it doesn't sound so good. I have XP Home, and I plan to buy only Visual C#, not Visual Studio,...
1
1226
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 this: <td><%# Server.HtmlEncode(((DesktopAlert.Web.User)Container.DataItem).Username) %></td> However, I want to do a string replace on the Username so I tried to do this: <%
3
1588
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" /> <authorization> <allow users="*" /> <!-- Allow all users --> </authorization> Now I added a html subdirectory that I want to only allow certain windows
7
2235
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 users to authenticate them using their current windows usernames and passwords. I have stored my users login names and passwords in SQL database, because I don't wish store an account for every user in my network at my XP machine. So is it posible...
7
4466
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 to be checking that the correct data type is used DataAcess sets an abstract class and methods
2
1540
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 like Sample Applications with documentation. That would be of great help. Thanks in Advance:
2
7657
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 PasswordRecovery with a Password reset required; a temporary password is sent to the account on file. I want an extra layer of security to accommodate the very unlikely contingency that someone's e-mail account is compromised. Challenging with the...
0
8476
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8393
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8820
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7433
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6223
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2810
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.