Generally, the configuration file is web. config or app. config. If we have created a config file and configured some information, then we should specify the config file to read the relevant information. Then I found a method, the execonfigurationfilemap class is available. To use this class, you must first reference system. configuration, create a new execonfigurationfilemap object, set the config path you created to the execonfigfilename attribute, and then use this method to configure Config = configurationmanager. openmappedexeconfiguration (ECF, configurationuserlevel. none); you can specify to read the configuration information in the newly created config file. There is a small problem here, that is, the config path, I can read the config when using the absolute path, but I cannot use the relative path, during debugging, I found that his reading path is under the System32 folder on drive C. Can you tell me why?