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

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(object sender, EventArgs e)
{
if (User.Identity.IsAuthenticated)
lblAuthentication.Text = "Authenticated user: " +
User.Identity.Name;
else
lblAuthentication.Text = "User not authenticated.
Anonymous access";

lblIdentity.Text = "Windows identity: " +
WindowsIdentity.GetCurrent().Name;
} // Page_Load()
Settings in web.config are as follows:

<authentication mode="Windows" />
<identity impersonate="false" />

<authorization>
<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
_windowsPrincipal.IsInRole(WindowsBuiltInRole.Admi nistrator)
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\NETWORK

how come???

Checking for
_windowsPrincipal.IsInRole(WindowsBuiltInRole.Admi nistrator)
i get FALSE ???

what is happening here?

thank you
Chris
Aug 26 '08 #1
0 907

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

Similar topics

2
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...
1
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
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<...
4
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...
0
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...
0
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...
1
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...
2
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...
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.