Owin Startup Detection

2020-03-23 06:25发布

问题:

I developed an application with Owin Startup class. When i am running the OwinHost.exe, it shows No Assembly found containing OwinStartupAttribute.

But I defined the assembly in my startup class as:

[assembly: OwinStartup(typeof(OwinDemo.BrandStartup))]

I also defined appSettings in the Web.Config file as:

<appSettings>
<add key="owin:AppStartup" value="OwinDemo.Startup, OwinDemo"/>

回答1:

Project-> right click add new item.

Startup.cs

using Microsoft.Owin;
using Owin;

[assembly: OwinStartup(typeof(SignalRChat.Startup))]
namespace SignalRChat
{

    public class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            app.MapSignalR();
        }
    }
}


标签: owin