我可以使用Ajax和ASP吗?同一页面上的NET跟踪?

时间:2020-12-30 02:01:26

I'm using an Ajax update panel and have recently added ASP.NET tracing code to aid in debugging. All of the sudden I started getting PageRequestManagerParseErrorExceptions when any Ajax code is executed.

我正在使用一个Ajax更新面板,最近添加了ASP。NET跟踪代码帮助调试。突然之间,我开始在执行任何Ajax代码时获得pagerequestmanagerparseerrorexception。

For example:
Trace.Write("Done setting employeeId.");

例如:跟踪。写(“完成设置employeeId。”);

Apparently this is because I am not allowed to use "server tracing" along with Ajax. (according to this post by Eilon Lipton).

显然,这是因为我不允许使用“服务器跟踪”和Ajax。(根据Eilon Lipton的这篇文章)。

Is this true? Am I not allowed to use the awesome ASP.NET tracing mechanism? It would be a shame.

这是真的吗?我不允许使用超棒的ASP吗?网络跟踪机制?这将是一个耻辱。

1 个解决方案

#1


3  

Setting pageOutput="false" on the trace element in web.config seems to solve the problem.

在web中的跟踪元素上设置pageOutput="false"。配置似乎解决了问题。

Use ASP.NET tracing, but rather write to the normal diagnostics trace by setting the writeToDiagnosticsTrace attribute to "true" (this is on the trace element in your web.config file).

使用ASP。而是通过将writeToDiagnosticsTrace属性设置为“true”(这是web中的跟踪元素),将其写入到常规诊断跟踪。配置文件)。

#1


3  

Setting pageOutput="false" on the trace element in web.config seems to solve the problem.

在web中的跟踪元素上设置pageOutput="false"。配置似乎解决了问题。

Use ASP.NET tracing, but rather write to the normal diagnostics trace by setting the writeToDiagnosticsTrace attribute to "true" (this is on the trace element in your web.config file).

使用ASP。而是通过将writeToDiagnosticsTrace属性设置为“true”(这是web中的跟踪元素),将其写入到常规诊断跟踪。配置文件)。