标签: asp.net .net asp.net-web-api
我的代码依赖于web.config中的配置信息。我希望它在我的应用程序启动时运行。只要它运行,确切的时间并不重要。
我知道PreApplicationStartMethodAttribute,但在web.config可用之前运行。我也知道App_Start中的Global.asax事件,但我想尽可能使用属性。
PreApplicationStartMethodAttribute
web.config
App_Start
Global.asax
该应用程序是在OWIN w / katana上运行的ASP.NET Web API。