Startup.cs
is a new way to initialize your app instead of Application_Start
in Global.asax and it's fine. But is there a place to put my teardown logic, for example this:
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_End()
{
// Release you ServiceBroker listener
SqlDependency.Stop(connString);
}
}
Looked in Microsoft.Owin namespace but it only seems to have OwinStartupAttribute
. Does this mean that application lifecycle events are still processed by System.Web.HttpApplication
instance and are not supported by OWIN specification?