【问题标题】:mvc webApi, why application start again?mvc webApi,为什么应用程序重新启动?
【发布时间】:2014-02-26 11:51:22
【问题描述】:

我在基于 mvs web api 的 durandal 项目中工作。

但是,有时它会在运行时再次到达 Application_Start(在 Global.asax 中)。

为什么?!它必须发生一次,当第一个请求到达服务器时!

例如,在 Application_Start 中,我初始化了一些单音实例类,它们又被初始化了!这对我的申请不利!

【问题讨论】:

  • 发布您的Application_Start 代码。

标签: asp.net asp.net-mvc asp.net-web-api durandal-2.0 application-start


【解决方案1】:

这是网络应用程序中的正常现象。 如果对您不利,请考虑将数据保存在您的数据库中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    • 2018-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多