Skip to content

Instantly share code, notes, and snippets.

@smaglio81
Created June 29, 2020 01:02
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 smaglio81/e3dc5f5afd112d9b941a4e4d17363d03 to your computer and use it in GitHub Desktop.
Save smaglio81/e3dc5f5afd112d9b941a4e4d17363d03 to your computer and use it in GitHub Desktop.
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace YourNamespace
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddYourDependencies()
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseMiddleware<EnableBufferingMiddleware>();
// use that middleware before everything else
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment