做了一个网站,一切都弄好了
就是找回密码(PasswordRecovery)的功能总是出错
提示:invalid character in mail header
谁能告诉我这个东西到底怎么设置啊?都用设置那些东西?
如能解决我将所有分贡献,
谢谢大家帮个忙!
就是找回密码(PasswordRecovery)的功能总是出错
提示:invalid character in mail header
谁能告诉我这个东西到底怎么设置啊?都用设置那些东西?
如能解决我将所有分贡献,
谢谢大家帮个忙!
解决方案 »
- 内嵌Repeater绑定数据时Repeater2未将对象引用到实例
- 点击按钮后,页面刷新前,怎样让按钮灰掉不能再点。
- Jmail的简单问题,白白送分啦.
- 大侠帮忙啊。。。。开100分!!!!!一个很简单的问题
- Service Unavailable在nhibernate里如何处理?
- asp.net下,c#的开发环境下,aspx的设计视图没有了,只有html模式?在线等
- 打开aspx页面导致机器无响应,谁遇到过,帮帮忙啊!谢谢!
- VS2005 里面的虚拟机是怎么回事啊
- 关于XML循环遍历子节点并取值
- 求救!不能创建asp.net应用程序和asp.net web 服务
- aspose.excel license问题!aspose.Excel文件在开发机器上可以运行,移到服务器上后,出现错误?
- 如何控制GridView 、DataList数据控件中的数据按要求输出呢?
mail头里的无效字符?
是不是地址不正确。
有空来欢迎你和你的朋友来我的博客看看,交流交流:http://blog.csdn.net/aafshzj/。
aspnetdb数据库的其它使用(用户注册,登录)等一切正常
但是使用这个控件找回密码总是出问题
下面是出错页面:
Server Error in '/WebSite8' Application.
--------------------------------------------------------------------------------An invalid character was found in the mail header.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: An invalid character was found in the mail header.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[FormatException: An invalid character was found in the mail header.]
System.Net.BufferBuilder.Append(String value, Int32 offset, Int32 count) +144
System.Net.Mail.EHelloCommand.PrepareCommand(SmtpConnection conn, String domain) +82
System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +790
System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +265
System.Net.Mail.SmtpClient.GetConnection() +43 我的设置是;
------------------------------------------web.config-------------------------------
....
<system.net>
<mailSettings>
<smtp from="[email protected]">
<network host="smtp.google.com" password="" userName="" />
</smtp>
</mailSettings>
</system.net>
...
------------------------passwordRecovery.aspx-------------------------------
......
<asp:PasswordRecovery ID="PasswordRecovery1" runat="server">
<MailDefinition From="[email protected]" IsBodyHtml="True" Priority="High"
Subject="Your new, temporary password.">
</MailDefinition>
</asp:PasswordRecovery>
.....
自己的调出来也是这个错误
提示在mail头中包含非法字符
你转换成base64,看看
这个不是合法的地址吧
[email protected]
是不是这个控件本身还有什么没有设置正确的?
invalid character in mail header
提示在mail头中包含非法字符
你转换成base64,看看是这样的,我直接用的控件,基本上一行代码都没有写,只是在属性里设置了一下
是不是这个控件的使用还有什么先决条件
AnswerRequiredErrorMessage="必须填写答案" GeneralFailureText="对不起,操作失败.." QuestionFailureText="您的答案不正确,请重试..."
QuestionInstructionText="回答下面问题取得密码:" QuestionLabelText="问题:" QuestionTitleText=""
SubmitButtonText="提交" SuccessText="您的密码已发至您的邮箱.." UserNameFailureText="您输入的用户名不存 在..." UserNameLabelText="用户名:" UserNameRequiredErrorMessage="必须填写用户名:"
Width="380px" UserNameInstructionText="输入您的用户名:" UserNameTitleText="找回密码" MailDefinition-From="[email protected]" MailDefinition-IsBodyHtml="true" MailDefinition-Priority="High" MailDefinition-Subject="您的新密码">
<MailDefinition From="[email protected]" Priority="High" Subject="您要找的密码..">
</MailDefinition>
</asp:PasswordRecovery>
aspnetdb数据库的其它使用(用户注册,登录)等一切正常
但是使用这个控件找回密码总是出问题
下面是出错页面:
Server Error in '/WebSite8' Application.
--------------------------------------------------------------------------------An invalid character was found in the mail header.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: An invalid character was found in the mail header.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[FormatException: An invalid character was found in the mail header.]
System.Net.BufferBuilder.Append(String value, Int32 offset, Int32 count) +144
System.Net.Mail.EHelloCommand.PrepareCommand(SmtpConnection conn, String domain) +82
System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +790
System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +265
System.Net.Mail.SmtpClient.GetConnection() +43 我的设置是;
------------------------------------------web.config-------------------------------
....
<system.net>
<mailSettings>
<smtp from="[email protected]">
<network host="smtp.google.com" password="" userName="" />
</smtp>
</mailSettings>
</system.net>
...
------------------------passwordRecovery.aspx-------------------------------
......
<asp:PasswordRecovery ID="PasswordRecovery1" runat="server">
<MailDefinition From="[email protected]" IsBodyHtml="True" Priority="High"
Subject="Your new, temporary password.">
</MailDefinition>
</asp:PasswordRecovery>
.....
就不用自己的了吧
2.楼上的能说得详细一点怎么把url编码格式转回去
我觉得也是这个问题好像