473,769 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems understanding Authentication / Authorisation in ASP.NET 2.0.

hello,

I have problems understanding Authentication / Authorisation in
ASP.NET 2.0.

I have a simple WhoAmI.aspx page

protected void Page_Load(objec t sender, EventArgs e)
{
if (User.Identity. IsAuthenticated )
lblAuthenticati on.Text = "Authentica ted user: " +
User.Identity.N ame;
else
lblAuthenticati on.Text = "User not authenticated.
Anonymous access";

lblIdentity.Tex t = "Windows identity: " +
WindowsIdentity .GetCurrent().N ame;
} // Page_Load()
Settings in web.config are as follows:

<authenticati on mode="Windows" />
<identity impersonate="fa lse" />

<authorizatio n>
<allow users="*" />
</authorization>

IIS 7.0 has Anonymous Authentication enabled

I log in as Chris (administrator of the machine), and browsing to the
page the output is:

Authenticated user: MyPC\Chris
Windows identity: MyPC\Chris
Additionally checking for
_windowsPrincip al.IsInRole(Win dowsBuiltInRole .Administrator)
i get TRUE
Then, I create a new administrator user called 'Bob'
I am using Windows Vista Home Premium so I can switch to user Bob and
when browsing to the same page i get a completely different result
namely:

User not authenticated. Anonymous access
Windows identity: NT AUTHORITY\NETWO RK

how come???

Checking for
_windowsPrincip al.IsInRole(Win dowsBuiltInRole .Administrator)
i get FALSE ???

what is happening here?

thank you
Chris
Aug 26 '08 #1
0 935

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

Similar topics

2
4046
by: John Glista | last post by:
Hello. I'm having a bit of a problem with the HTTPSConnection class. It is part of the httplib module. I discovered that it is not neccessary to specifiy a key and a certificate when opening an HTTPS connection. I tested this with several sites, and successfully opened https connections with them. However, I'm having problems with the server I'm trying to connect to. It is a Novell Bordermanager server that tunnels all Internet...
1
1641
by: naijacoder naijacoder | last post by:
Hi Everyone, I have some Questions relating to Active Directory and Asp.net. 1)I have created a role based authorisation using SQL Server but i want to use Active Directory as a datastore now? 2)Now if i want to allow the user to login credentials against the Active directory and then implementing the roles i have in my Database would i need to have roles in my Active Directory?
2
2068
by: Pepe | last post by:
Hi! I have a program that excutes the following code: DirectoryInfo diretorio = new DirectoryInfo(@"C:\teste"); FileInfo arquivos = diretorio.GetFiles("*.xml"); for(int contador=0;contador< arquivos.Length;contador++) { lblMensagem.Text = "Uploading files... ";
4
1231
by: Sarah | last post by:
I have 2 sites in IIS. One as a subfolder of the webroot. One a virtual directory. They have seperate web.config enabled formsauthetication. The login screen validates the credentials and redirects: FormsAuthentication.RedirectFromLoginPage(txtUserName, true); I want to be able to persist both authentication cookies, but everytime I log in to one site, I seem to lose authentication in the other, and when I
0
1677
by: JimLad | last post by:
Hi, I've been tasked with reviewing the Authentication and Auditing of an application and database. ASP/ASP.NET 1.1 app with SQL Server 2000 database. Separate audit trail database on same server. The system is intranet based and currently uses Basic Authentication on IIS6. The application itself is mostly classic ASP, but has been
0
1254
by: stevecnz | last post by:
I'm looking for feedback on an authentication solution we are considering for an ASP.NET 2.0 project. The site will be accessed by both internal users who are logged into the Windows domain, and external (business partner) users via the internet. The internal users are required to be authenticated via Windows Integrated Authentication (WIA), and external users will be authenticated using a custom solution based on a signed ticket that...
1
290
by: David | last post by:
Hi all, Using C# .NET 1.1 Forms Authentication. I have my site set up to be anonymous access, almost all the way through. I have a login page, that when someone logs in, the site now has extra features. I don't need to protect the directories using web.config or anything, just to have the features enabled based on authentication and
2
9278
by: Max Vit | last post by:
I have been toying with the idea of having an Active Directory authentication / authorisation functionality in MS Access; but there is not much useful info around. I have built these functionalities for some applications (JAVA, PHP). The parameters used there are the LDAP parameters for AD: *searchFilter: (objectClass=user) *searchBase: OU=register,OU=applications,DC=inside,DC=mycompany,DC=com *adminPassword: Password
5
3566
by: Rory Becker | last post by:
Having now created a Custom MembershipProvider that seems to work correctly with my Logon and ChangePassword controls, I am, as they say, a happy bunny. The next stange is to move on to the creation of content which adjusts based on the user. I have several pages which require a user to be logged on and several which do not. Prior to this point in time I have used 2 different master pages. one with a control which checks a session...
0
9579
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
10208
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10038
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
9987
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
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8867
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
7404
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
3952
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
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.