首页 > 解决方案 > IIS Web 请求无限期挂起 - OWIN 模块

问题描述

Web 应用程序(ASP .NET MVC - C#)在 Windows 机器上运行,它已经托管在 IIS 8.5 上。该应用程序使用Membership和 .NET framework 4.5。

最近,它在总响应时间超过 100 万毫秒时下降了两次。

我检查了 IIS 工作进程,我看到所有请求都按照PreExecuteRequestHeaders模块中的以下屏幕截图卡在那里OWIN,应用程序从很久以前就没有任何变化,并且流量不高。

我可以看到另一个问题也有同样的问题,但是这里的问题我想知道问题的原因或根本原因是什么?因为,我没有async在这个应用程序中使用调用。

IIS - PreExecuteRequestHeaders

编辑:我在启动时使用了打击:

[assembly: OwinStartupAttribute(typeof(MyProject.Startup))]
namespace MyProject
{
    public partial class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            // some other configurations which are related to logs ... bla bla bla
        }
    }
}

public partial class Startup
{
    // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
    public void ConfigureAuth(IAppBuilder app)
    {
        // Enable the application to use a cookie to store information for the signed in user
        app.UseCookieAuthentication(new CookieAuthenticationOptions
        {
            AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
            LoginPath = new PathString("/Account/Login")
        });
        // Use a cookie to temporarily store information about a user logging in with a third party login provider
        app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
    }
}

标签: c#asp.netiisowin

解决方案


推荐阅读