// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { //set the globa service GlobalService.ServiceProvider = app.ApplicationServices; GlobalService.Configuration = _config; GlobalService.UpdateDatabase(); // if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseStaticFiles(); app.UseSignalR(config => { config.MapHub <MessageHub>("/messages"); }); app.UseMvc(); }