不应该OwinStartupAttribute Global.asax中和的Application_Start运行之前? [英] Shouldn't OwinStartupAttribute run before global.asax and Application_Start?

查看:449
本文介绍了不应该OwinStartupAttribute Global.asax中和的Application_Start运行之前?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要运行code应用程序之前开始,到现在为止我已经使用WebActivator要做到这一点,但如果我理解正确的 OwinStartupAttribute 更适合的但对我的问题是,它在的Application_Start 运行在的Global.asax ,这是正确的或者我可以配置它运行pre应用程序启动?

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?

推荐答案

根据这个答案它的Application_Start后小幅运行。所以,如果你和我一样需要的Application_Start运行之前code,WebActivator仍然是去我猜的方式。 <一href=\"http://stackoverflow.com/questions/20168978/do-i-need-a-global-asax-cs-file-at-all-if-im-using-an-owin-startup-cs-class-and\">Do我需要的Global.asax.cs文件在所有如果我使用的是OWIN Startup.cs类,并把所有的配置呢?

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?

这篇关于不应该OwinStartupAttribute Global.asax中和的Application_Start运行之前?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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