using Microsoft.Owin; using Owin; [assembly: OwinStartup(typeof(AppletMvcService.Startup))] namespace AppletMvcService { public class Startup { public void Configuration(IAppBuilder app) { //app.UseCors(CorsOptions.AllowAll);//跨域访问 app.MapSignalR(); //app.Map("/signalr", map => //{ // map.UseCors(CorsOptions.AllowAll); // var hubConfiguration = new HubConfiguration // { // EnableJSONP = true // }; // map.RunSignalR(hubConfiguration); //}); // 有关如何配置应用程序的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkID=316888 //app.Map("/signalr", map => //{ // map.UseCors(CorsOptions.AllowAll); // var hubConfiguration = new HubConfiguration // { // EnableJSONP = true // }; // map.RunSignalR(hubConfiguration); //}); } } }