Ask a Question related to ASP.NET Security, Design and Development.
-
Christoph Erdle #1
Windows mode authentication - anonymous and authenticated accesson same page
Hi,
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:
<snip>
<!-- Grant access to all files to all (anonymous and authenticated) users
-->
<authentication mode="Windows" />
<authorization>
<!-- Allow all users -->
<allow users="*"/>
</authorization>
<!-- 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">
<system.web>
<authorization>
<allow users="?, user1, user2" roles="Users"/>
</authorization>
</system.web>
</location>
</snip>
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)
Christoph Erdle Guest
-
Authentication for anonymous users?
What should I do for realising the following task: Anonymous users can browse my ASP.net site( limited number of pages), but when the try to access... -
Anonymous & Authenticated Access (Together?)
I'm trying to create a web service that contains functions available to both Anonymous & Authenticated access. Now I am having problems with... -
issues mixing integrated Windows authentication and anonymous on same application
I'm having issues mixing integrated Windows authentication and anonymous access on same IIS app. Basically, any post back event fails (Forms... -
Force Popup with authentication mode="Windows"
Is there a way to make my intranet web application NOT automatically use the logged in user when using the "Windows" authentication mode? I want to... -
Windows Authentication and Anonymous login URGENT
| users. However I need to be able to tell a difference if | they have login through the intranet, which window | authentication just lets them in,...



Reply With Quote

