Re: asp.net windows authentication

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



this is normal. if the browser requests a resource and get a 401 (access denied), the browser asks a new login. you could write a handler that checked for the 401 and if the user had sent a valid login, redirect to an access denied page instead of responding with a 401.

-- bruce (sqlwork.com)


DK wrote:
I have an intranet application I've built using asp.net 3.5 / running on
IIS6.

The problem: when a user trys to access a page that they do not have access to, they are given the annoying windows authentication popup, which is useless because they are denied in the web.config file. After 3 tries or hitting cancel, they are then directed to the Access Denied page.

How can I get rid of that popup ???

In my main web.config I have this:
<authentication mode="Windows"/>
<authorization>
<deny users="?"/>
</authorization>

other web.configs would look like this:
<system.web>
<authorization>
<allow roles="MyDomain\AllowedRoles"/>
<deny users="*"/>
</authorization>

In IIS6 under Directory Security > Authentication Methods everything is cleared except Integrated Windows Authentication.

There's another app on another server in our domain that is set up the exact same way (as far as I can tell) and you go directly to the Access Denied page. There must be something stupid that I'm missing.

It's not the end of the world but I'd like to solve this.....Thanks.
.



Relevant Pages

  • Windows authentication difficulties
    ... I am having problems trying to perform authorization in a web ... application using windows authentication. ... if I try this I get the login prompt but it does not allow ... If you access the application from a remote machine ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Websites require a login
    ... I am an admin on the local machine. ... just to see if authorization is the problem. ... I login with the same login I have already logged in with, it works, if I ...
    (microsoft.public.dotnet.framework.aspnet)
  • Websites require a login
    ... if I am not a user on the local machine. ... I am using windows authentication, ... authorization is the problem. ... Still requires a login. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Credentials not being passed with remote access
    ... allowed windows authentication to work, ... I had assumed johnx was a domain user rather than a local Windows account. ... johnx was set up as a local login on sql server. ...
    (microsoft.public.sqlserver.security)
  • Re: ASP 2.0, C#, LDAP Login, and Forms impersonation?
    ... Or, I could just start over with a windows authentication login, and after ... FormsAuthenticationTicket fat = fi.Ticket; ... I do not set any dwFlags. ...
    (microsoft.public.dotnet.framework.aspnet.security)