Chinaunix首页 | 论坛 | 博客
  • 博客访问: 265569
  • 博文数量: 81
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 878
  • 用 户 组: 普通用户
  • 注册时间: 2014-07-25 23:20
文章分类

全部博文(81)

文章存档

2017年(45)

2016年(20)

2015年(2)

2014年(14)

我的朋友

分类: C#/.net

2016-12-23 16:41:04

我用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 
            app.MapSignalR();
        }
    }
}    


或者:

Web.config添加



    
  
阅读(2357) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~