mono下使用ajax控件报Details: Error parsing near错误
Posted on 2014-09-21 11:53 froglog 阅读(494) 评论(0) 编辑 收藏 举报centOS-6.5 + mono-3.6+jexus-3.6.1
使用ajax控件时,在windows iis下没有问题,linux 下报如下错误
行: 16
错误: Sys.WebForms.PageRequestManagerParserErrorException:
The message received from the server could not be parsed.
Common causes for this error are when the response is modified by calls to Response.Write(),
response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'v>
</div>|6'.
试着在page 上加 EnableEventValidation="false" ValidateRequest="false" 不起作用,在web.config加 <httpRuntime requestValidationMode="2.0"/> <pages validateRequest="false" > 问题依旧
后来打开页面源文件发现有中文乱码,查看web.config <globalization/>字符配置 为gb2312
修改为utf-8 : <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
再次调试问题解决。不过又出现一个问题就是页面中文全是乱码。
在page页面添加 <meta charset="utf-8" /> 再次调试乱码消失