Created
April 30, 2020 14:32
-
-
Save CoreProgramm/94029fd464c53b1cd52e5c57bff7b937 to your computer and use it in GitHub Desktop.
Custom Middleware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
app.UseCustomLoggerMiddleware(); | |
app.Run(async (context) => | |
{ | |
await context.Response.Body.WriteAsync(Encoding.ASCII.GetBytes("This is called from Configure() method response")); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment