zoukankan      html  css  js  c++  java
  • MVC5 使用SignalR记录

    1.安装以下安装包

    还有下面这个可以加载js文件10

    2.web项目增加以下类

    using Microsoft.AspNet.SignalR;
    using Microsoft.Owin;
    using Microsoft.Owin.Cors;
    using Owin;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    [assembly: OwinStartup(typeof(XXXXX.Startup))]
    namespace XXXX
    {
        public class Startup
        {
            public void Configuration(IAppBuilder app)
            {

    app.Map("/signalr", map =>
                {
               map.UseCors(CorsOptions.AllowAll);
    var hubConfiguration = new HubConfiguration { EnableJSONP = true }; map.RunSignalR(hubConfiguration); }); app.MapSignalR(); } } }
    小人才疏学浅,看官不喜勿喷,谢谢
  • 相关阅读:
    day3
    day2
    day1-存储
    day5-iptables
    MySQL之补充
    11.18
    11.17
    junit基础学习之-测试controller层(2)
    junit基础学习之-简介(1)
    外键和级联
  • 原文地址:https://www.cnblogs.com/feiqilai/p/15572322.html
Copyright © 2011-2022 走看看