hallo,
i bought the book: asp.net 2.0 website programming by marco bellinaso, i have to admit that i come from the classical ASP and do not have very much idea about asp.net.
i'm now kind of stuck at chapter 4, that is i've done my custom login control in the masterpage (adapted to my needs) with following code:
Code:
<div id="login">
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:Login ID="Login" runat="server" FailureAction="RedirectToLoginPage">
<LayoutTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>Benutzer:</td>
<td><asp:TextBox ID="UserName" runat="server" CssClass="logininput"></asp:TextBox></td>
<td align="right"><asp:RequiredFieldValidator ID="valRequiredUserName" runat="server" SetFocusOnError="true" Text="*" ControlToValidate="UserName" ValidationGroup="Login"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td>Passwort:</td>
<td><asp:TextBox ID="Password" runat="server" TextMode="Password" CssClass="logininput"></asp:TextBox></td>
<td align="right"><asp:RequiredFieldValidator ID="valRequiredPassword" runat="server" SetFocusOnError="true" Text="*" ControlToValidate="Password" ValidationGroup="Login"></asp:RequiredFieldValidator></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><asp:CheckBox ID="RemeberMe" runat="server" Text="merken" /></td>
<td align="right"><asp:ImageButton ID="Submit" runat="server" CommandName="Login" ValidationGroup="Login" /></td>
<td align="right"> </td>
</tr>
</table>
<div style="border-top:solid 1px black; margin-top:2px">
<asp:HyperLink ID="lnkRegister" runat="server" NavigateUrl="~/Register.aspx">registrieren</asp:HyperLink><br />
<asp:HyperLink ID="lnkPasswordRecovery" runat="server" NavigateUrl="~/PasswordRecovery.aspx">Passwort vergessen?</asp:HyperLink>
</div>
</LayoutTemplate>
</asp:Login>
</AnonymousTemplate>
<LoggedInTemplate>
<div id="welcomebox">
<asp:LoginName ID="LoginName1" runat="server" FormatString="Hallo {0}!" /><br />
<asp:HyperLink ID="lnkProfile" runat="server" Text="Profil ändern" NavigateUrl="~/EditProfile.aspx"></asp:HyperLink>
<asp:LoginStatus ID="LoginStatus1" runat="server" />
</div>
</LoggedInTemplate>
</asp:LoginView>
</div>
my web.config is configured like this:
Code:
<system.web>
<authentication mode="Forms">
<forms name="WAFORMAUTH" loginUrl="~/AccessDenied.aspx" defaultUrl="~/Default.aspx"
requireSSL="true" cookieless="AutoDetect" />
</authentication>
<roleManager enabled="true" cacheRolesInCookie="true" cookieName="WAROLES"/>
<machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" decryption="Auto" validation="SHA1"></machineKey>
<pages enableViewStateMac="true" viewStateEncryptionMode="Always" theme="standard" masterPageFile="~/Template.master" />
<compilation debug="true"/>
</system.web>
and in my AccessDenied.aspx i've got this stuff like error messages. i've also created a new user with the wright permissions and rights, but the problem is: i always get to the AccessDenied.aspx which is telling me about my false credentials, so i can't log in. so the code i'm using is very similar to the book (which i've read until page 152, where the userprofil control is described)...
can anyone tell me waht i'm doing wrong, or give me a hint


