我创建了一个web API并将OWIN中间件添加到项目中,即Startup.cs,Startup.Auth.cs和OpenIdConnectCachingSecurityTokenProvider.cs(根据Azure AD B2C的需要)。
但是,我的Web API要求我在Startup.cs中使用程序集属性[assembly: OwinStartup(typeof(My_Web_API_2.Startup))]
,否则不会检测到OWIN启动类。 TaskService app in the Azure AD B2C sample不需要该属性。
OWIN Startup class detection docs状态
命名约定:Katana在中查找名为Startup的类 与程序集名称或全局名称空间匹配的名称空间。
但是我的Web API使用匹配的程序集名称和全局命名空间?我的Web API中缺少什么来检测OWIN Startup类?