1
我有一个Web API 2应用程序,托管在IIS上。OwinStartup停止与IIS(但仍与IIS Express一起工作)发射
要配置OWIN,它具有类似于这样的启动类:
[assembly: OwinStartup(typeof(Startup))]
namespace Application.Api
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
throw new Exception("Owin startup class fired"); // Added for test pourposes
}
}
}
这个应用程序的工作就像一个魅力直到它停止射击的Startup
类:在配置文件中没有任何改变,没有包的更新,文件Microsoft.Owin.Host.SystemWeb.dll出现在斌文件夹,配置是OK等
只有它停止工作,但如果我设置的项目作为启动项目并运行它与F5使用IIS Express启动类正确加载。
我检查的其他职位有可能会导致没有运气:
- OWIN not firing up if project not set as Startup with IIS Express
- OwinStartup not firing
- OwinStartup not Starting ... Why?
- Can't get the OWIN Startup class to run in IIS Express after renaming ASP.NET project file
等