473,569 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Figuring out who the user is

Hello..

I'm using windows integrated security, with the following web.config:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="netus er" password="p"/>

And I am trying to figure out who is the actual human user sitting at
the keyboard. With WindowsIdentity , I can find out all there is to know
about the "netuser" account, but I need to know the signin name of the
user who is actually logged into the domain.

Is this possible?

Thanks.
Jun 27 '08 #1
2 1576
Jon Mcleod wrote:
Hello..

I'm using windows integrated security, with the following web.config:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="netus er" password="p"/>
There was no way for you to know it (except maybe by browsing through some
of the previous questions in this newsgroup before posting yours - always a
recommended practice) , but this is a classic (COM-based) asp newsgroup.
ASP.Net bears very little resemblance to classic ASP so, while you may be
lucky enough to find a dotnet-knowledgeable person here who can answer your
question, you can eliminate the luck factor by posting your question to a
group where those dotnet-knowledgeable people hang out. I suggest
microsoft.publi c.dotnet.framew ork.aspnet or the forums at www.asp.net.
And I am trying to figure out who is the actual human user sitting at
the keyboard. With WindowsIdentity , I can find out all there is to
know about the "netuser" account, but I need to know the signin name
of the user who is actually logged into the domain.
Maybe from the IIS logs?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jun 27 '08 #2
Hi Jon,
Please follow the steps given below:
1. Apart from whatever setting you are currently having in Web.config, also
add the these lines just below the authentication mode setting.
<authorizatio n>
<deny users="?"/>
</authorization>
2. Then in the code behind page of your web page add the following code:

Dim User As System.Security .Principal.IPri ncipal
User = System.Web.Http Context.Current .User

Dim username As String
username = User.Identity.N ame

Response.Write( "This is the current logged in user: " & username)

I have created an application to test the code and it works fine for me.

regards,
Joy

"Jon Mcleod" wrote:
Hello..

I'm using windows integrated security, with the following web.config:

<authenticati on mode="Windows"/>
<identity impersonate="tr ue" userName="netus er" password="p"/>

And I am trying to figure out who is the actual human user sitting at
the keyboard. With WindowsIdentity , I can find out all there is to know
about the "netuser" account, but I need to know the signin name of the
user who is actually logged into the domain.

Is this possible?

Thanks.
Jun 27 '08 #3

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

Similar topics

8
1641
by: Nathan Pinno | last post by:
Hi all, I need help figuring out how to fix my code. I'm using Python 2.2.3, and it keeps telling me invalid syntax in the if name == "Nathan" line. Here is the code if you need it. #This program asks for a password, then asks for the user's name after the correct password has been supplied. The computers response will vary, # depending...
19
2167
by: darrel | last post by:
On my vb.net page, I have 4 sets of inputs + form buttons. example: Search: (GO) Zip: (GO) County: (GO) County: (GO) The problem is if I go to the page, type in a zip code, and hit enter.
5
1739
by: booner | last post by:
I have a table (user) ip, ssn, date,name Each time the user does something, I record that information in the table. I'd like get a list of the last 4 entries for distinct ssn. I started with this ... but cannot seem to get only the top 4 distinct SSNs. select top 4,ssn,name from user where ip='<ip>' order by date desc
0
7703
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...
0
7618
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...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
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...
1
7679
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...
1
5514
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...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
946
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...

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.