我想在web.config文件中发表评论,如下所示:
<httpRuntime requestValidationMode="2.0" // require for [ValidateInput(false)] in .net-4.0 requestPathInvalidCharacters="" // include & character in the url enableVersionHeader="false" // disable X-AspNet-Version header />
解决方法
web.config文件是一个XML文件,因此您唯一的选择是使用XML注释:
<!-- requestValidationMode="2.0" - require for [ValidateInput(false)] in .net-4.0 requestPathInvalidCharacters="" - include & character in the url enableVersionHeader="false" - disable X-AspNet-Version header --> <httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters="" enableVersionHeader="false" />