Can I have ApplicationSettings in a separate file, if so, how?

After reading about the differences between appSettings and applicationSettings in the web.config file, I would prefer to use the applicationSettings section and use strongly typed settings. But with the appSettings section, you could have a separate section in another file and just reference it on web.config using the 'file =' attribute in the section like this .

I would like to leave my application settings separate from the web.config file so that when the user changes any parameters, the application does not restart automatically.

Is there a similar way to achieve this using the new applicationSettings section and using strongly typed settings?

+3
source share
2 answers

You can do this through a visual studio. These steps are described here. link msdn

0
source

Use the executable name of the application and add .comfig to the end. Then save the file in the same directory.

e.g. myappname.exe.config

There is a great article at TechRepublic that details how to do this.

https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-1044975.html

0
source

Source: https://habr.com/ru/post/1723719/


All Articles