asp.net.netasp.net-mvcapplication-restartapp-globalresources

modify App_GlobalResources file force the application to restart


As the title said, if I update the values from App_GlobalResources file, the application will restart. Is there any way to prevent it?


Solution

  • No, there is no way to prevent it.
    According the MSDN:

    When you make a change to a default resource file, either local or global, ASP.NET recompiles the resources and restarts the ASP.NET application. This can affect the overall performance of your site. If you add satellite resource files, it does not cause a recompilation of resources, but the ASP.NET application will restart.

    Since the resources are considered static data, any changes of them leads to the restart of the ASP.NET application.

    More information:
    Editing resource files without recompiling ASP.NET application
    ASP.NET Web Site or ASP.NET Web Application?