Groups | Blog | Home
all groups > asp.net > february 2007 >

asp.net : other problem with PsswordRecovery


Greg9Strat
2/12/2007 5:58:27 PM
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="defaultEmail@yourdomain.com">
<network host="smtp.yourdomain.com" port="25"
userName="yourUserName" password="yourPassword"/>
</smtp>
</mailSettings>
</system.net>
</configuration>

Hope this helps!
Greg

[quoted text, click to view]

Dan
2/12/2007 11:14:27 PM
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

Dan
2/13/2007 12:00:00 AM
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


"Greg9Strat" <greg9strat@gmail.com> schreef in bericht
news:1171331907.738538.191330@a75g2000cwd.googlegroups.com...
[quoted text, click to view]

AddThis Social Bookmark Button