Stumped on basic forms login?

G

Guest

This seems to be so straightforward, but I keep having the following issue.
I'm trying to make a login and create user page, but everytime i click
through the CreateNewUser url, it brings me back to the login page. Any
ideas? Here's the login page:

Default.aspx:
<form id="form1" runat="server">
<div>
<asp:Login ID="mylogin" Runat="server"
CreateUserUrl="~/newuser.aspx" CreateUserText="become a new user">
</asp:Login>
</div>
</form>

Here's the new user page, newuser.aspx:
<body>
<form id="form1" runat="server">
<div>
<asp:CreateUserWizard ID="CreateUserWizard1" Runat="server">
</asp:CreateUserWizard>

</div>
</form>
</body>

and here's the web.config:

<system.web>
<authorization >
<deny users="?" />
</authorization>
<authentication mode="Forms" >
<forms loginUrl="Default.aspx" />
</authentication>
<compilation debug="true"/>
</system.web>


What am I missing?
 
W

William F. Robertson, Jr.

You are missing your location tag in the web.config that allows
unauthentication users to your CreateNewUser.aspx.

<location path="CreateNewUser.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>

hth,

bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top