// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); } app.UseStaticFiles(); app.UseCookiePolicy(); var wsOptions = new WebSocketOptions { KeepAliveInterval = TimeSpan.FromSeconds(10), ReceiveBufferSize = 4096 }; wsOptions.AllowedOrigins.Add("*"); app.UseWebSockets(wsOptions); app.UseMvc(); EventsController.Configure(Configuration["LogDirectory"], Configuration["VoiceUrl"], Configuration["MyUrlBase"]); }