使用法语字符时的Web配置错误 [英] Web config error when French characters are used
本文介绍了使用法语字符时的Web配置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个Asp.Net Web应用程序。我使用 SMTP 方法手动发送邮件。在这里从web配置中的地址我使用法语字符,当它们存在并部署时,网站正在关闭并且显示500错误
< system.net >
< mailSettings >
< smtp 来自 = Marché Matériel < igsupport@dfmstore.com> deliveryMethod = 网络 >
< network host = 172.00.0.123 < span class =code-attribute> port = 25 enableSsl = false userName = pbtest 密码 = pa55w0rd! / >
< / smtp >
< / mailSettings >
< / system.net >
请帮帮我。在abve中,粗体内容是使用的法语字符。提前谢谢。
解决方案
在Visual Studio中,保存web.config时,应选择编码(UTF-8) )在文件下 - >高级 - >保存选项。
您还应该更改<和>到& lt;和& gt;分别。
< smtp 来自 = MarchéMatériel& lt; igsupport@dfmstore.com& gt; deliveryMethod = 网络 > 跨度>
Hi,
I am developing a Asp.Net web application. In that I use SMTP method to send mails manually. Here In from address in web config I am using french characters, when they are present and deployed the site is being down and 500 error is displaying
<system.net>
<mailSettings>
<smtp from="Marché Matériel < igsupport@dfmstore.com >" deliveryMethod="Network">
<network host="172.00.0.123" port="25" enableSsl="false" userName="pbtest" password="pa55w0rd!" />
</smtp>
</mailSettings>
</system.net>
Please help me out. In abve bold content is the french character used.Thanks in advance.
解决方案
In Visual Studio, when saving web.config, you should select the encoding (UTF-8) under File -> Advanced -> Save Options.
You should also change the < and > to < and > respectively.
<smtp from="Marché Matériel < igsupport@dfmstore.com >" deliveryMethod="Network">
这篇关于使用法语字符时的Web配置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文