I'm using the VB.NET language in ASP.NET, with Windows XP on the desktops
and Windows 2003 on the network servers. When users log on, they have to
enter a user name and password in the netowrk operating system. Is there a
function or other means I can use to capture the Windows 2003 login user
name for use in my code?
Thanks in advance,
Paul 4 1739
Hi Paul,
First, in the IIS snap-in, go to the Directory Security tab.
There, click the first edit button (Auth. and access control). Disable
Anonymous Access and be sure to check the Integrated Windows
Authentication checkbox.
Now you can readout the username with Request.ServerV ariables("LOGON _USER")
There will be another way wit the System.Security but I have to find
that out how to exactly.
Cheers,
//Rutger http://www.RutgerSmit.com
Paul Ponzelli wrote: I'm using the VB.NET language in ASP.NET, with Windows XP on the desktops and Windows 2003 on the network servers. When users log on, they have to enter a user name and password in the netowrk operating system. Is there a function or other means I can use to capture the Windows 2003 login user name for use in my code?
Thanks in advance,
Paul
Thanks for your help, Rutger.
Actually, dotnet can also get logon user data using Iprincipal object
(Page.User):
string logonUser = Page.User.Ident ity.Name;
Of course, you should deny anonymous access. And you can deny anonymous
access in application level in web.config file:
<authorizatio n>
<deny user="?" /> <!— deny anonymous -->
<allow roles="*" /> <!—allow all other -->
</authorization>
HTH
Elton Wang
"Paul Ponzelli" wrote: I'm using the VB.NET language in ASP.NET, with Windows XP on the desktops and Windows 2003 on the network servers. When users log on, they have to enter a user name and password in the netowrk operating system. Is there a function or other means I can use to capture the Windows 2003 login user name for use in my code?
Thanks in advance,
Paul
Thanks for this way of getting the logon user name, Elton.
And thanks for the info about denying anonymous access.
Paul This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Lee |
last post by:
Need some help bad here. Am using VB.Net Standard 2003 supplied for
a class and I need to install Msde and the sample databases to work on
homework. Following the documentation I can download sql2kdesksp3.exe
and get the server running. I cannot then install the sample databases
according to directions. Log file follows:
2:28:26 AM Wednesday, October 01, 2003:
12:28:26 AM Wednesday, October 01, 2003: Modified the sourceview node
of...
|
by: dave |
last post by:
Hi I have succesfully captured the users login detail, but I now
have a new problem I have assigned the login to a Session Variable, however
when I come to use the string stored in the variable it excludes the \ which
seperates the domain from the user name, it should be :DOMAIN\USERNAME , but
I am getting DOMAINUSERNAME which really is a pain. Anybody
know why this is happening and how I can overcome it ?
Thanks
|
by: talk_positive |
last post by:
Hi...
I have made a asp page that accepts some data from user and stores it in MS
Access database. Now...I want to identify the user who filled the form and
store this information in database. About the enviornment....the server has
Windows 2000 server installed. Clients have Windows XP. Server also has
Exchange 2003 installed and every client has Outlook Express installed. Every
user has to login to his account inorder to use a machine....
|
by: Alex Marsh |
last post by:
I want to record the user who created a record (and the user who last
changed the record), either initials or a short name
How can I capture a user-id? Can it be done from the user info in the
Windows Registry, or would it involve setting up Security and getting
users to log on to Access?
Any suggestions appreciated
|
by: Brent Burkart |
last post by:
I am trying to capture the Windows Authenticated username, but I want to be
able to capture the login name that exists in IIS, not Windows. In order to
enter my company's intranet through the internet, they have to login. I want
to be able to capture that login versus their Windows login because I need
to know who they are from any computer rather than only their computer. Any
ideas?
Thanks
| |
by: serge calderara |
last post by:
Dear all,
I clearly underdand the advantage of both type of authentification but is it
allowed or possible to set the Authentication mode to Windows and then handle
a login form for defined users in Credential section like as follow :
<authentication mode="Windows" >
<forms loginUrl="Login.aspx">
<credentials passwordFormat="Clear">
<user name="Jessee" password="JuneBug"/>
|
by: Paul Ponzelli |
last post by:
I'm using the VB.NET language in ASP.NET, with Windows XP on the desktops
and Windows 2003 on the network servers. When users log on, they have to
enter a user name and password in the netowrk operating system. Is there a
function or other means I can use to capture the Windows 2003 login user
name for use in my code?
Thanks in advance,
Paul
|
by: =?Utf-8?B?QXZhRGV2?= |
last post by:
ASP.Net 2.
We are migrating to Windows 2008 64 bit Server with IIS 7 from Windows 2003
32 Bit with IIS 6. A few library classes we wrote uses impersonation in code
like explained in this article:
http://support.microsoft.com/?id=306158#4
This doesn't work in Windows 2008 Server, we receive the following exception:
|
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...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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,...
| |
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...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |