我用VS2012在Nuget中安裝Signalr以後報錯 web
「/」應用程序中的服務器錯誤。服務器
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.app
解決辦法:ui
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(); } } }
或者:spa
Web.config添加code
<appSettings> <add key="owin:AutomaticAppStartup" value="false" /> </appSettings>
http://stackoverflow.com/questions/20068075/owin-startup-class-missingorm