Wrox Programmer Forums
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 19th, 2006, 03:15 AM
Registered User
Join Date: Dec 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with PasswordRecoveryUrl

I am developing a web site and this is authentication and authorization tag of my site:
    <authentication mode="Forms">
      <forms name="EquityChoice" loginUrl="~/SignIn.aspx" protection="All" />
      <deny users="?" />
i also use the login control that is :

<asp:Login ID="EquityLogin" runat="server" Width="100%" DestinationPageUrl="~/Default.aspx" FailureText='<img src="App_Themes/Equity/Image/icon_err.gif" width="16" height="16" align="top">&nbsp;Your login attempt was not successful. Please try again.' OnLoggedIn="EquityLogin_LoggedIn" RememberMeText="Remember My Password" TitleText="Sign In" BackColor="White" BorderColor="#F7F6F3" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#333333" PasswordRecoveryText="Forgot your password?" PasswordRecoveryUrl="~/Pass.aspx">
                <TitleTextStyle Font-Bold="True" Font-Names="Times New Roman" HorizontalAlign="Left" BackColor="CornflowerBlue" Font-Size="Medium" ForeColor="White" /><CheckBoxStyle Font-Size="Small" />
                <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
                <TextBoxStyle Font-Size="Small" Width="140px" />
                <LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px"
                    Font-Names="Verdana" Font-Size="Small" ForeColor="#284775" />

As you can see i've used PasswordRecoveryText and PasswordRecoveryUrl but when i click "Forgot your password?",nothig happens and i remain in the Login page.
What is my problem?
Thank you for your attnetion.

Old December 19th, 2006, 01:37 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

I think it only looks like nothing is happening, but what I think is happening is this:

1. You access the Login page and click the Password recovery link

2. You're taken to ~/Pass.aspx

3. However, you need to be logged in on that page, so you're taken back to Login.aspx.

There are at least to ways around this:

1. Add the PasswordRecovery to the login page as well, and show / hide it depending on some condition.

2. Add a <location> tag to your web.config to unblock the Pass page, like this:

  <location path="~/Pass.aspx">
      <allow users="*" />

This section, placed near the end of the config file unblocks access to ~/Pass.aspx.

Hope this helps,

Imar Spaanjaars
Everyone is unique, except for me.
Old December 19th, 2006, 07:17 PM
Registered User
Join Date: Dec 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Imar,

Thank you for your help.I used your second solution,it was quite helpful and solved my problem.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.