protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); //connection routing for api controller RouteConfig.RegisterRoutes(RouteTable.Routes); Bot.Get(); //primary bot initialization }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes(RouteTable.Routes); Bot.Get(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, Bot bot) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } bot.Get(); app.UseMvcWithDefaultRoute(); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvc(options => options.EnableEndpointRouting = false).AddNewtonsoftJson(); Bot.Get().Wait(); SqlService.InitConnection(); }