这是我的 web.config 文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false">
<environmentVariables>
<environmentVariable name="TEST_WEBCONFIG_VARIABLE" value="some test webconfig variable value" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</configuration>
我该如何在Startup.cs
中从我的web.config文件中读取TEST_WEBCONFIG_VARIABLE
变量?
我尝试了Configuration["TEST_WEBCONFIG_VARIABLE"]
,但在配置值列表中找不到此变量。