Home All Groups Group Topic Archive Search About

Forms authentication fails on Windows XP PRO

Author
15 May 2005 12:12 PM
Natalia Zosimova via .NET 247
(Type your message here)
I use Forms authentication in my ASP.NET project.
The authentication works without any problems on Windows Server 2000.
On Windows XP I?ve been struggling to get it work.
I?ve got many troubles with this, some of them I?ve managed to fix.
The current problem is the following:
When I request a secure page which is protected with Form-based authentication,
I do get redirected to my login page (which is named? ResourceLogin.aspx?)
but instead of getting this page display I get the error:
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: You do not have permission to view this directory or page using the credentials you supplied. Contact the Web server's administrator for help.

The auth & author sections in the web.config:
<authentication mode="Forms">

     <forms name = ".RESAUTH" loginUrl="http://localhost:5555/CAPSTONE/SecurePages/ResourceLogin.aspx" protection="All" timeout="30" path="/" requireSSL="false" >
     </forms>
    </authentication>
    <!--  AUTHORIZATION
          This section sets the authorization policies of the application. You can allow or deny access
          to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
          (unauthenticated) users.
    -->

    <authorization>
        <deny users="?" /> <!-- Allow all users -->
                   <!--  <allow     users="[comma separated list of users]"
                             roles="[comma separated list of roles]"/>
                  <deny      users="[comma separated list of users]"
                             roles="[comma separated list of roles]"/>
            -->
    </authorization>


--------------------------------
From: Natalia Zosimova

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>AQBDWWU4/UanZZUQNWC1lw==</Id>

Author
17 May 2005 8:50 PM
baylor
i'm not sure why this isn't working for you. Something similar works for me.
Tthe only thing i do different is that i use a relative rather than absolute
URL. That and i'm on 2000.

However, i remember reading in some documentation somewhere that you really
should give explicit authorization to your login Web page. In your
authorization section, you forbid anonymous users from accessing your login
page. Out of curiosity, what happens when you allow them rights to that (and
only that) page?

-baylor