C# OWIN/Katana中间件经典asp页面跳过管道
我在MVC4.5上构建了一个经典的asp应用程序,我正在尝试拦截对经典asp页面的调用,但看起来我无法做到这一点。你知道怎么做吗。不知道如何让中间件拦截这些请求。看起来类似,但他们使用的是一个模块。。我希望能够使用中间件 有什么想法吗 添加startup.csC# OWIN/Katana中间件经典asp页面跳过管道,c#,asp.net-mvc,owin-middleware,C#,Asp.net Mvc,Owin Middleware,我在MVC4.5上构建了一个经典的asp应用程序,我正在尝试拦截对经典asp页面的调用,但看起来我无法做到这一点。你知道怎么做吗。不知道如何让中间件拦截这些请求。看起来类似,但他们使用的是一个模块。。我希望能够使用中间件 有什么想法吗 添加startup.cs using System; using System.Threading.Tasks; using Microsoft.Owin; using Owin; using System.Web;
using System;
using System.Threading.Tasks;
using Microsoft.Owin;
using Owin;
using System.Web;
using System.IO;
using Microsoft.Owin.Extensions;
using Microsoft.Owin.Security.Cookies;
using Microsoft.Owin.Security.WsFederation;
using Microsoft.Owin.Security;
using Microsoft.IdentityModel;
using System.Web.Helpers;
using System.Security.Claims;
using System.Collections.Generic;
using System.Security.Principal;
using System.Threading;
using System.Web.Mvc;
public void Configuration(IAppBuilder app)
{
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
ConfigureAuth(app);
}
private void ConfigureAuth(IAppBuilder app)
{
app.Use(typeof(LogMiddleware));
app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
CookieSecure = CookieSecureOption.Always,
LoginPath = new PathString("/Account/Login"),
ExpireTimeSpan = TimeSpan.FromMinutes(30),
CookieDomain = MvcApplication.CookieDomian,
CookiePath = MvcApplication.ApplicationPath,
CookieName = "asp.net",
CookieHttpOnly = true,
AuthenticationMode = AuthenticationMode.Active,
}
});
app.UseStageMarker(PipelineStage.Authenticate);
app.MapWhen(
context => context.Request.Path.ToString().EndsWith(".asp"),
appBranch =>
{
System.Diagnostics.Debugger.Break();
});
app.Use(typeof(ResponseHeaderMiddleware));
runallmanagedmodulesforallrequests在web配置中设置为false
将此设置为true,它就会工作。。。谁会猜到呢。分享你的startup.cs pleaseWow,Owin上的经典asp。我为你的勇敢喝彩。我正在努力,不是出于选择,但它从来没有拦截过那些电话。我怀疑这与owin的全部目的是摆脱IIS这一事实有关。不确定我是否可以将自定义http模块与owin middle wareMarcus混合使用,对此有何想法?