Membership & Roles

Giganews Newsgroups
Subject: Membership & Roles
Posted by:  Allen (ats…
Date: Wed, 18 Feb 2009

Good afternoon.  I have a web application created in VS.Net 2005.  I have
configured the database and can create users and reset passwords etc.
However, when a user enters username and password into the login control
and hits enter the login page just refreshes and no redirection to
Default.aspx takes place.  I have stepped through the code in the
Login1_Authenticate event and the user is authenticated. For this I use the
following code:

Protected Sub Login1_Authenticate(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.AuthenticateEventArgs) Handles

If Membership.ValidateUser(Me.Login1.UserName, Me.Login1.Password)                 
            e.Authenticated = True
            e.Authenticated = False
        End If
End Sub

In my web.config I have the following:
<authentication mode="Forms">
            <forms name="AuthCookie" path="/" loginUrl="login.aspx"
        <membership defaultProvider="CustomizedProvider"
                <clear />
                <add name="CustomizedProvider"
connectionStringName="RSDMConnStr" requiresUniqueEmail="false"
requiresQuestionAndAnswer="true" passwordFormat="Clear"
enablePasswordRetrieval="true" enablePasswordReset="true"
minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="8"
applicationName="RSDM" />
            <deny users="*" />
        <roleManager enabled="true" defaultProvider="CustomizedProvider"
cacheRolesInCookie="true" cookieName=".RSDMROLES" cookieTimeout="30"
cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true"
                <clear />
                <add name="CustomizedProvider"
connectionStringName="RSDMConnStr" applicationName="RSDM" />

Is there something missing or wrong here?

Second question concerns sub directories.  I want to ahve three or four
pages that anybody can view and then I want to have a directory containing
pages that users need to be logged in to see.  Do I need to have a seperate
web.config or can I adapt the main web.config to do this?



It's easy to lay down and hide
Where's the warrior without his pride?

Adam and The Ants - Dog Eat Dog