Skip to content

Instantly share code, notes, and snippets.

Created May 4, 2018 12:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
using System;
using System.Web;
namespace Autofac.Integration.Web.Sample
public class Global : HttpApplication
protected void Application_Start(object sender, EventArgs e)
var builder = new ContainerBuilder();
builder.RegisterSource(new WebFormRegistrationSource());
var container = builder.Build();
var provider = new AutofacServiceProvider(container);
HttpRuntime.WebObjectActivator = provider;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment