在.net framework 4.0版本以下,

只需要在web.config中进行如下配置:

<configuration>
    <system.web>
        <pages  validateRequest="false">

 

而在.net framework 4.0版本中,则需要再多添加一行配置,如下:

  <httpRuntime  requestValidationMode="2.0">

即:

<configuration>
    <system.web>
        <pages  validateRequest="false">

   <httpRuntime  requestValidationMode="2.0">

相关文章:

  • 2021-10-05
  • 2023-03-15
  • 2021-04-08
  • 2022-01-14
  • 2021-04-19
  • 2021-08-31
  • 2022-12-23
猜你喜欢
  • 2021-08-12
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案