Click to See Complete Forum and Search --> : PasswordRecovery Problems.


lmf232s
04-29-2007, 04:57 PM
Not quite sure what i did to break this but its not working (Not sure if it was ever working on the new site).

Im not sure what else to look for as everything looks like its in place. Hopefully someone can point out something that im overlooking.

Here is the password recovery code and web.config code.


'PASSWORDRECOVERY
<asp:PasswordRecovery ID="PasswordRecovery1"
Runat="server"
UserNameTitleText=""
UserNameLabelText="Email Address:"
UserNameInstructionText=""
TextBoxStyle-Width="255"
SubmitButtonStyle-Width="150"
SubmitButtonText="Generate New Password"
SuccessPageUrl="Login.aspx"
CssClass="Label1">
</asp:PasswordRecovery>

'WEB.CONFIG
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">
<providers>
<add name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="oConn"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
applicationName="SalesPortal"
requiresUniqueEmail="true"
passwordFormat="Hashed"
minRequiredPasswordLength="4"
minRequiredNonalphanumericCharacters="0"
maxInvalidPasswordAttempts="15"/>
</providers>
</membership>


Any Ideas?

Ribeyed
05-01-2007, 09:09 AM
what error are you getting?
Is the email getting sent out?

lmf232s
05-01-2007, 10:08 AM
Not a real error but just the message that is returned from the control that the email address entered does not match any user or basicaly does not exist. I know this to not be the case.

In looking at my other site I see that there is an ASPNET SQL SERVER User set up. I added a ASPNET User but did not seem to fix the problem.

Its almost like the control is not quering my tables thus it cant find the user.

I ended up doing it all from code behind and just said screw the control. The membership has the ability to generate a new password so i baically used the membership to look the user up, generate a new password and then email the user.

While this works it still leaves me wondering why it would not work. This sites framwork was identical to my other site so..........

Ribeyed
05-01-2007, 10:55 AM
Hi,

need more information becuse it can be a number of things.

is there any code in the code-behind page?
Don't see where the email address is retrieved and set.

Have you checked the smtp settings in IIS?

some microsoft topics on the PasswordRecovery control.

http://msdn2.microsoft.com/en-us/library/ms178335(vs.80).aspx

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.passwordrecovery(vs.80).aspx

lmf232s
05-01-2007, 11:35 AM
No there is no code behind

The email address is set in the web.config file under the <MailSettings>
smtp is set up and working (i can send email from the website no problem)

I have looked those 2 articles over and over for the past couple of days with no help.

Again, I have no clue whats going on with that control. I was under the impression that it was the ASPNET sql server user (as this is the only different i can see between the 2 sites) but if that was the case im not sure if the login control would work.

So im stumped. Ill tell you this, once i finally figure it the problem out it will probablly be something very simple that was overlooked.