web.config 中的 Appsetting 条目抛出特殊字符错误
Appsetting entry in web.config throwing error for special characters
我必须在 web.config 文件的 appsettings 中使用以下 URL。
<add key="ReportUrl" value="http://Myserver/ReportServer/Pages/ReportViewer.aspx?/MyApplication/Reports/Safeguards+Equipment+and+Supplies+Request&rs:Command=Render&rc:Parameters=True&RequestNumber="/>
出现问题是因为应用设置的值中使用了冒号。我该如何修复错误。
显示的错误如下
"Application Configuration file "Web.config" is invalid. An error occurred while parsing EntityName...."
您可以尝试使用 & 而不是 &;
下面是几个 XML 转义字符供您将来使用!
" "
& &
' '
< <
> >
在此处阅读更多内容What characters do I need to escape in XML documents?
我必须在 web.config 文件的 appsettings 中使用以下 URL。
<add key="ReportUrl" value="http://Myserver/ReportServer/Pages/ReportViewer.aspx?/MyApplication/Reports/Safeguards+Equipment+and+Supplies+Request&rs:Command=Render&rc:Parameters=True&RequestNumber="/>
出现问题是因为应用设置的值中使用了冒号。我该如何修复错误。
显示的错误如下
"Application Configuration file "Web.config" is invalid. An error occurred while parsing EntityName...."
您可以尝试使用 & 而不是 &;
下面是几个 XML 转义字符供您将来使用!
" "
& &
' '
< <
> >
在此处阅读更多内容What characters do I need to escape in XML documents?