Ejemplo n.º 1
0
        public void Configuration(IAppBuilder app)
        {
            var config = new HttpConfiguration();

            DIConfig.ConfigureInjector(config);
            app.UseCors(CorsOptions.AllowAll);
            TokenConfig.ConfigureOAuth(app, config);
            RouteConfig.Register(config);
            WebApiConfig.Configure(config);
            app.UseWebApi(config);//es 'Clave' para que funcione el WebApi
        }
Ejemplo n.º 2
0
        public void Configuration(IAppBuilder app)
        {
            log4net.Config.XmlConfigurator.Configure();
            var log = log4net.LogManager.GetLogger(typeof(Startup));

            log.Debug("Login habilitado");

            var config = new HttpConfiguration();

            config.Services.Replace(typeof(IExceptionHandler), new GlobalExceptionHandler());
            DIConfig.ConfigureInjector(config);
            TokenConfig.ConfigureAuth(app, config);
            RouteConfig.Register(config);
            WebApiConfig.Configure(config);
            app.UseWebApi(config);
        }
        public void Configuration(IAppBuilder app)
        {
            /*Configuracion del log4net:*/
            log4net.Config.XmlConfigurator.Configure();
            var log = log4net.LogManager.GetLogger(typeof(Startup));

            log.Debug("Loggin habilitado");

            var config = new HttpConfiguration();

            config.Services.Replace(typeof(IExceptionHandler), new GlobalExceptionHandler());

            DIConfig.ConfigureInjector(config);
            //Permite el Cross Origin
            app.UseCors(CorsOptions.AllowAll);

            TokenConfig.ConfigureOAuth(app, config);
            RouteConfig.Register(config);
            WebApiConfig.Configure(config);
            app.UseWebApi(config);
        }