Skip to content

Instantly share code, notes, and snippets.

@jchannon
Last active July 14, 2016 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchannon/75c88ec1d2f75e97dba0b7f3a471692e to your computer and use it in GitHub Desktop.
Save jchannon/75c88ec1d2f75e97dba0b7f3a471692e to your computer and use it in GitHub Desktop.
public void Configure(IApplicationBuilder app)
{
app.UseOwin(x =>
{
//Use Owin here
x.UseFirstPipelineMWThatIsOwin();
//Use ASP.Net Core pipeline inside UseOwin
app.Use((context, next) => {
context.Request.Headers.Add("CUSTOM", "BOB");
return next();
});
//Use Owin here
x.UseMyOwinMW();
});
}
public void Configure(IApplicationBuilder app)
{
//Use Owin here
app.UseOwin(x => x.UseFirstPipelineMWThatIsOwin());
//Use ASP.Net Core pipeline
app.Use((context, next) => {
context.Request.Headers.Add("CUSTOM", "BOB");
return next();
});
//Use Owin here
app.UseOwin(x.UseMyOwinMW());
}
public void Configure(IApplicationBuilder app)
{
//Use middleware converted for owin to aspnetcore pipeline here
app.UseFirstPipelineMWThatIsConvertedFromOwin());
//Use ASP.Net Core pipeline
app.Use((context, next) => {
context.Request.Headers.Add("CUSTOM", "BOB");
return next();
});
//Use Owin here where we have to at the bottom
app.UseOwin(x.UseMyOwinMW());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment