Soe Moe Thu
Soe Moe Thu

Reputation: 59

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?

Upvotes: 2

Views: 1066

Answers (2)

Bilal Halayqa
Bilal Halayqa

Reputation: 972

Actually you can prevent the restart but on changes on all configuration files. I could not find away to do it only to the App_GlobalResources file.

See this answer :

How to prevent an ASP.NET application restarting when the web.config is modified?

Upvotes: 0

VMAtm
VMAtm

Reputation: 28345

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?

Upvotes: 1

Related Questions