Shouldn't OwinStartupAttribute run before global.asax and Application_Start?

不问归期 提交于 2019-12-23 10:27:09

问题


I need to run code before application start and up until now I have used WebActivator to do that but if I understand correctly the OwinStartupAttribute is more suitable for that but the problem for me is that it runs after Application_Start in Global.asax, is this correct or can I configure it to run pre application start?


回答1:


According to this answer it runs slightly after Application_Start. So if you, just like me need to run code before Application_Start, WebActivator is still the way to go I guess. Do I need a Global.asax.cs file at all if I'm using an OWIN Startup.cs class and move all configuration there?



来源:https://stackoverflow.com/questions/24998796/shouldnt-owinstartupattribute-run-before-global-asax-and-application-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!