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

  • 相关阅读:
    Java控制台常用命令
    redis如何查看所有的key
    An internal error has occurred. Java heap space
    redis演练
    各种编程实现的树
    MYSQL两个数据库字符集保持一致问题
    进程控制之fork函数
    进程控制之进程标识符
    进程环境之getrlimit和setrlimit函数
    进程环境之setjmp和longjmp函数
  • 原文地址:https://www.cnblogs.com/shenyixin/p/6215263.html
Copyright © 2011-2022 走看看