1、 在程序允许的情况下,降低.Framework的版本,具体方法如下:
<!--修改前--> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> <!—将其删除--> </system.web> <!--修改后--> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web>
2、更改Web.config配置文件设置Unobtrusive ValidationMode的类型,具体方法如下:
<!--修改前--> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <!--修改后--> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <appSettings> <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> </appSettings>