[英]Uncaught Sys.WebForms.PageRequestManagerParserErrorException
This is the strangest issue i have ever had in my programming life, I have spent two days looking for solutions to the below exception, but i couldn't find out where it's happening. 这是我编程生涯中遇到过的最奇怪的问题,我花了两天时间寻找以下异常的解决方案,但我不知道它在哪里发生。
In Asp.net 4.5 application, I have Crafts.aspx on the root folder, in this page i have some ajax requests and it's working fine. 在Asp.net 4.5应用程序中,我在根文件夹上有Crafts.aspx,在此页面中,我有一些ajax请求,并且工作正常。
I have copied the page exactly as it's to Crafts2.aspx, no any change but the name. 我已将页面完全复制到Crafts2.aspx,但名称没有任何变化。 The problem is, Any page name other that Crafts.aspx will throw the below exception and breakpoints are not working for it in debugging mode.
问题是,除Crafts.aspx以外的任何页面名称都将引发以下异常,并且断点在调试模式下不起作用。
Uncaught Sys.WebForms.PageRequestManagerParserErrorException: 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 ' <!DOCTYPE html>
I couldn't find any reason for this exception, both pages are exactly the same in design and code behind, the only difference is the page name, Where's the Reasonable Suspicion in such problem? 我找不到此异常的任何原因,两个页面的设计和背后的代码都完全相同,唯一的区别是页面名称,此类问题的合理怀疑在哪里?
Removing action
attribute from the form
will solve the problem: 从
form
删除action
属性将解决问题:
Before: 之前:
<form id="form1" runat="server" action="./">
After: 后:
<form id="form1" runat="server" >
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.