Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Windows mode authentication - anonymous and authenticated accesson same page

Thread Tools

Windows mode authentication - anonymous and authenticated accesson same page

Christoph Erdle
Posts: n/a

at the moment I'm developing a Web-Application with C# and encounter problems
using Windows NTLM authentication with IIS 6.0 (W2k3EE).

I use an aspx-page, in which depending on the user's authentication different
content is provided. There's an area for anonymous access and one for
authenticated users.

In the code im checking the state of the authentication via the Property
Page.User.Identity.IsAuthenticated. Hasn't the user been authenticated yet, all
works fine, i get the parts for anonymous access. But if the user is
authenticated, most of the time the user gets the parts for anonymous access,
seldom the one for authenticated users (meening
Page.User.Identity.IsAuthenticated is false most of the time).

As this aspx-page has to grant both anonymous and authenticated access, i worked
with the following web.config:

<!-- Grant access to all files to all (anonymous and authenticated) users
<authentication mode="Windows" />
<!-- Allow all users -->

<allow users="*"/>


<!-- For the Page myPage.aspx special access control is required. So i added
the users "user1" and "user2" to the list of allowed users on that page and
replaced everybody with anonymous (* with ?)
<location path="myPage.aspx">
<allow users="?, user1, user2" roles="Users"/>


What's wrong in the web.config, as getting such weird results?

Thanks for your help,
Christoph Erdle
Life is very short and there's no time
For fussing and fighting, my friends
(The Beatles)

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to migrate an anonymous profile to an authenticated one GeoffreyD ASP .Net 2 01-29-2008 10:39 AM
Anonymous and authenticated access with multilpe web.config files =?Utf-8?B?QUFPTVRpbQ==?= ASP .Net 1 05-17-2006 09:46 PM
How to Synchronize anonymous users with authenticated users using profiles? Rodusa ASP .Net 2 09-08-2005 08:12 PM
issues mixing integrated Windows authentication and anonymous on same application developer ASP .Net Security 2 08-31-2004 07:32 AM
Prevent a page in an authenticated application from being authenticated Abhijit ASP General 0 04-12-2004 02:10 PM