在一页上,我看到一些我无法解释的 AJAX 请求有 500 毫秒的延迟。有问题的页面在加载时会触发两个 AJAX 请求以执行相同的操作,其中一个将被阻止。这是为什么?
在调用方法之前 ASP.NET 堆栈做了Application_AcquireRequestState
什么?我使用了 MiniProfiler 的 ghetto 分析方法,当Application_AcquireRequestState
被调用时,我可以看到在调用这两个Application_PostMapRequestHandler
和Application_AcquireRequestState
.
我完全禁用了会话状态。
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Appfail.WebForms" version="1.1.0" targetFramework="net45" />
<package id="AttributeRouting" version="2.5.1.0" targetFramework="net45" />
<package id="AttributeRouting.Core" version="2.5.1.0" targetFramework="net45" />
<package id="AttributeRouting.Core.Web" version="2.5.1.0" targetFramework="net45" />
<package id="AutoMapper" version="2.1.267" />
<package id="CodeContracts.Unofficial" version="1.0.0.2" targetFramework="net45" />
<package id="DataAnnotationsExtensions" version="1.1.0.0" />
<package id="DataAnnotationsExtensions.MVC3" version="1.1.0.0" />
<package id="DiffPlex" version="1.2.0" targetFramework="net45" />
<package id="DotNetOpenAuth.Core" version="4.1.0.12182" targetFramework="net45" />
<package id="DotNetOpenAuth.OAuth.Consumer" version="4.1.0.12182" targetFramework="net45" />
<package id="DotNetOpenAuth.OAuth.Core" version="4.1.0.12182" targetFramework="net45" />
<package id="DotNetOpenAuth.OAuth2.Client" version="0.25.0-draft1" targetFramework="net45" />
<package id="DotNetOpenAuth.OAuth2.ClientAuthorization" version="0.25.0-draft1" targetFramework="net45" />
<package id="DotNetOpenAuth.OAuth2.Core" version="0.25.0-draft1" targetFramework="net45" />
<package id="DotNetOpenAuth.OpenId.Core" version="4.1.0.12182" targetFramework="net45" />
<package id="DotNetOpenAuth.OpenId.RelyingParty" version="4.1.0.12182" targetFramework="net45" />
<package id="DynamicQuery" version="1.0" />
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
<package id="LinqKit" version="1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="4.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<package id="MiniProfiler" version="2.0.2" />
<package id="MiniProfiler.EF" version="2.0.3" />
<package id="morelinq" version="1.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.8" targetFramework="net45" />
<package id="RequestReduce" version="1.8.76" targetFramework="net45" />
<package id="WebActivator" version="1.5.1" />
<package id="WebGrease" version="1.1.0" targetFramework="net45" />
</packages>