zoukankan      html  css  js  c++  java
  • 我用VS2012在Nuget中安装Signalr之后报错

    我用VS2012在Nuget中安装Signalr之后报错 

    “/”应用程序中的服务器错误。


    The following errors occurred while attempting to load the app.
    - No assembly found containing an OwinStartupAttribute.
    - No 'Configuration' method was found in class 'Microsoft.VisualStudio.Web.PageInspector.Runtime.Startup, Microsoft.VisualStudio.Web.PageInspector.Runtime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
    To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config.
    To specify the OWIN startup Assembly, Class, or Method, add the appSetting owin:AppStartup with the fully qualified startup class or configuration method name in your web.config.

    解决办法:

    The template produces such a class:
    
    using System;
    using System.Threading.Tasks;
    using Microsoft.Owin;
    using Owin;
    
    [assembly: OwinStartup(typeof(WebApiOsp.App_Start.Startup))]
    
    namespace WebApiOsp.App_Start
    {
        public class Startup
        {
            public void Configuration(IAppBuilder app)
            {
                // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
                app.MapSignalR();
            }
        }
    }    

    或者:

    Web.config添加

    <appSettings>
        <add key="owin:AutomaticAppStartup" value="false" />
      </appSettings>

     http://stackoverflow.com/questions/20068075/owin-startup-class-missing

  • 相关阅读:
    JSON Web Token
    Centos 7下编译安装PHP7.2(与Nginx搭配的安装方式)
    Nginx配置详解
    Centos 7下编译安装Nginx
    PHP常用正则验证
    拼手气红包函数
    获取汉字首字母大写
    根据生日计算年龄
    ffmpeg获取视频封面图片
    对象脑图总结
  • 原文地址:https://www.cnblogs.com/shenyixin/p/6215263.html
Copyright © 2011-2022 走看看