Is web.config more secure than class?

I read a tutorial on ASP.NET and a third-party API, and he mentioned that the KEY and SECRET KEY APIs should be stored in the web.config file for security on production servers, and not in classes that use them, However, I'm not quite sure which is safer for the web.config file than for the class? I understand the convenience of storing it in a configuration file, but I don’t see the security benefits?

+3
source share
4 answers

To get started, you can quickly update the API key in the web.config file. You will have to recompile the class and redeploy the class.

web.config, asp.net 2.0

http://weblogs.asp.net/scottgu/archive/2006/01/09/434893.aspx

machine.config, , , - . Web.Configs , web.config , , .

+6

web.config , -. , .

+1

. , , , .

. web.config ( App_Code) ( bin) ( , ).

, . web.config , , Reflector, , .

The only advantage web.config has over building an assembly is that you can encrypt sections of the web.config file, as Scott Guthrie points to his blog .

0
source

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


All Articles