|
- using System;
- using System.Threading.Tasks;
- using Microsoft.AspNet.SignalR;
- using Microsoft.Owin;
- using Microsoft.Owin.Cors;
- using Owin;
-
- [assembly: OwinStartup(typeof(Quanjiang.DigitalSchool.IMServerService.Startup1))]
-
- namespace Quanjiang.DigitalSchool.IMServerService
- {
- public class Startup1
- {
- public void Configuration(IAppBuilder app)
- {
- app.Map("/signalr", map =>
- {
- map.UseCors(CorsOptions.AllowAll);
- var hubConfiguration = new HubConfiguration
- {
- // You can enable JSONP by uncommenting line below.
- // JSONP requests are insecure but some older browsers (and some
- // versions of IE) require JSONP to work cross domain
- EnableJSONP = true
- };
- // Run the SignalR pipeline. We're not using MapSignalR
- // since this branch is already runs under the "/signalr"
- // path.
- map.RunSignalR(hubConfiguration);
- });
- app.MapSignalR();
- // 有关如何配置应用程序的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkID=316888
- }
- }
- }
|