I am trying to read how to properly configure the configuration in .net and run something that I find a little strange, and that the configuration parameters are compiled into assemblies through the Settings class. Removing app.config and running the application does not result in configuration errors, as I expected, but now I have no way to replace the configuration values.
In my application, I have a configuration parameter for the webservice url that I need to be able to select and install programmatically. Do I have to create custom sections in the configuration for my application, which I will read through ConfigurationManager.GetSection (..) to cause the configuration file to be read, or is there another way to solve this problem, since I absolutely do not want the webservice URL to use generating a ws proxy as a URL that could potentially leak during production.
Please, help.
, . .
look .NET?
.NET
, , settings.designer.cs
, , .
.
- , .
-, , URL- - (.. ).
"-". - " URL" "" "".
, , - URL-, .
( ),.Net , Windows, , .
(C:\Documents and settings\yourusername\Local Setting\Application Data\ ) , . ,.
, - , web.config( , ) ?
, webservice , app.config( web.config) , ... ... URL webservice. Framework 1.1 2.0.
Settings.settings... 3.0 . web.config, Settings.settings, ... . webservice , , .
... Settings.settings , , - .
:
, , , . , - www.productionurl.com, - url . , url ( , Dynamic).
, 2 :
, - . , - .
Source: https://habr.com/ru/post/1702751/More articles:NHibernate - Join Without Matching - referenceMigrating an application from Oracle 9 to Oracle 11 - gottchas? - oraclemap limit key and value types - harder - javaPossible minus if the operator (? :) in C #? - c #What happened to my soft shadow code? - c #Debugging data structures visually - javaHighlighting reference types in template functions - c ++In C #, is there a ready-made way to create a three-way lookup table? - c #Eclipse PDE - marker annotation type - background color is not updated - eclipseHow to see the latest relationship changes in a SQL 2000 database - sql-serverAll Articles