other problem with PsswordRecovery

D

Dan

Hi,


I define a Login control with PasswordRecovery and a CreateUserWizard.
I use the default ASPNETDB.mdf database.

I can create an user (let's say 'dan' and i can log in.

The problem is: when i try the PasswordRecovery with username 'dan' with the
right question answered, but there is an error (smtp provider not found
because of wrong name or because of broken internet connection), i never can
log in back with 'dan'. But if i try to create 'dan' again, i get the
message: "username already exists".

I tried this several times on independant applicatiod ns with different
aspnetdb.mdf, each time with the same problem.


Any explanation for that weird behaviuor?
Thanks
Dan
 
G

Greg9Strat

Hi Dan,

The reason you can't log back in w/ 'Dan' is that the membership
provider has already reset your password and has attempted to send the
email with your new password. But, because SMTP is not correctly set
up, it couldn't complete the process. Unfortunately, the whole thing
is not transactional, so it resets your password regardless of what
happens next...

You should have something in your web.config like the following:

<? xml version="1.0"?>
<configuration>
<system.net>
<mailSettings>
<smtp from="(e-mail address removed)">
<network host="smtp.yourdomain.com" port="25"
userName="yourUserName" password="yourPassword"/>
</smtp>
</mailSettings>
</system.net>
</configuration>

Hope this helps!
Greg
 
D

Dan

Thanks for replying, Greg.
One more question about your explanation.
What is userName? Is that my own username for the application stored in the
database or is that my username for connecting to my internet-provider?
And what's the purpose of "userName="yourUserName" password="yourPassword"
in web.config?
So far, i haven't used those parameters.
Thanks
 

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