帮助使用 ASP.NET 密码恢复

发布于 2024-09-08 11:07:31 字数 617 浏览 6 评论 0原文

我正在尝试使用 asp.net 3.5 提供的密码恢复控件,当用户按下提交时出现此错误:

Microsoft JScript runtime error: 
Sys.WebForms.PageRequestManagerServerErrorException:  
The specified string is not in the form required for an e-mail address.

我确信用户(需要密码恢复)的电子邮件地址是正确的([电子邮件受保护])。
我也确信 web.config 中的 smtp 设置是正确的。发件人的电子邮件格式为 [电子邮件受保护]
那么我做错了什么?我不知道从哪里开始调试才能找到问题!

i am trying to use the password recovery control provided by asp.net 3.5 and i get this error when the user presses submit :

Microsoft JScript runtime error: 
Sys.WebForms.PageRequestManagerServerErrorException:  
The specified string is not in the form required for an e-mail address.

i am sure that the email address of the user (who needs pass recovery) is correct ([email protected]).
and i am also sure that my smtp settings in web.config are correct. The email of the sender is in the form of [email protected]
so what am i doing wrong? i don't know where to start debugging so i can find the problem!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

音盲 2024-09-15 11:07:31

您能否调试并给出传递给 Send 函数的参数? (更准确地说是 FromTo 参数)问题很可能出在这两个参数之一。

有关 MailAddress 类的文档,请参阅

Could you debug and give the parameters you are passing to the Send function? (more exactly the From and To parameters) Most likely the problem is in one of those 2 parameters.

For documentation regarding the MailAddress class see this.

自我难过 2024-09-15 11:07:31

错误消息可能说的是实话,理想情况下,您可以在“最后”阶段获得一些输出 - 就在错误发生之前。可能是您不小心在开头添加了“mailto:”,或者前后有空格,或者换行符,或者类似的东西。

如果您可以发布确切的输出,并用引号或括号括起来,以查看之前或之后是否有空格,那么问题是什么应该很明显 - 否则请对此答案发表评论,我们将很乐意进一步诊断。

希望有帮助!

The error message is probably telling the truth, ideally get some output at the 'most final' stage you can - right before the error occurs. It could be you've accidentally added 'mailto:' at the beginning, or there's a space before or after, or a newline, or something like that.

If you could post the exact output, surrounded by quotes or brackets to see if there is whitespace before or after, it should become obvious what the problem is - else please post a comment to this answer and we will be happy to diagnose further.

Hope that helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文