Owin启动检测 [英] Owin Startup Detection

查看:81
本文介绍了Owin启动检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Owin Startup类开发了一个应用程序.当我运行OwinHost.exe时,它显示No Assembly found containing OwinStartupAttribute.

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))]

我还在Web.Config文件中将appSettings定义为:

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

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

推荐答案

项目->右键单击添加新项.

Project-> right click add new item.

Startup.cs

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启动检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆