Example #1
0
        public void Configuration(IAppBuilder app)
        {
            var config = new HttpConfiguration();

            app.UseCors(CorsOptions.AllowAll);

            ConfigureOAuth(app);
            WebApiConfig.Register(config);

            SwaggerConfig.Register(config);

            app.UseWebApi(config);
        }
Example #2
0
        public void Configuration(IAppBuilder app)
        {
            // Serve Swagger UI
            app.UseStaticFiles();

            var httpConfig = new HttpConfiguration();

            // setup webapi
            WebApiConfig.Register(httpConfig);

            // setup swagger
            SwaggerConfig.Register(httpConfig);

            // setup autofac
            AutofacConfig.Register(httpConfig);

            // register to owin
            app.UseWebApi(httpConfig);
        }