【问题标题】:Application_BeginRequest takes too much time to reach the page_load of the aspx pageApplication_BeginRequest 需要太多时间才能到达 aspx 页面的 page_load
【发布时间】:2014-04-18 14:13:22
【问题描述】:

我在框架 4.0 中构建的 asp.net 网站中有一个奇怪的问题。 我的 .aspx 页面中有一个按钮,必须单击该按钮才能执行特定操作,但应用程序运行速度有点慢。 请求首先到达 global.asax 的“Application_BeginRequest”事件,然后到达 .aspx 页面的 pageLoad 事件。 这个循环运行良好,但在两者之间会随机减慢速度。

我们将日志放在页面的事件中,发现从 Application_BeginRequestpageLoad 事件需要 5 到 8 秒.aspx 页面。 这意味着 Application_BeginRequest 花费了太多时间。我们在 Application_BeginRequest 中对代码进行了注释,并在此处简单地编写了 return 语句。但结果还是一样。

【问题讨论】:

    标签: c# asp.net iis-7


    【解决方案1】:

    我怀疑问题出在会话变量上,因为它进入队列并且可能会锁定任何页面(它反映在 _BeginRequest 的总时间中)

    如果你玩 Session,我建议你放一些代码来演示你的场景。

    如需进一步研究,请转至checkout the explanation & customSession module,如果适合您的需要。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-19
      • 1970-01-01
      • 2022-12-23
      • 2014-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多