Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经将 Web 应用程序从 2.0 切换到 4.0。
我对 validateRequest="false" 有疑问,我需要从 aspx 页面读取 xml 文件(该页面由另一个网站调用,用户看不到)。它在 2.0 中运行良好。现在另一个网站返回错误 500。我在 google 上发现在 webconfig system.web 中,我必须设置但属性 requestValidationMode 无效(并且 intellisense 在 VS 中没有向我显示)...
我怎样才能做到这一点?
谢谢
您添加此代码
<system.web> <compilation debug="true" targetFramework="4.0" /> <httpRuntime requestValidationMode="2.0" /> </system.web> Nota : On IIS : Right click on WebSite - Select> Properties > ASP.NET > Version > - Select 4.0.21006 not 2.0