小编ska*_*fes的帖子

ConfigurationManager.AppSettings 始终为空

我搜索的主题

我的应用程序是一个 .NET Core 3.1 应用程序,因此我System.Configuration.ConfigurationManager通过 NuGet将该库添加到我的项目中。我的根文件夹包含Web.Config以下内容

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.web>
        <compilation debug="true"  />
        <httpRuntime  />
    </system.web>
    <appSettings>
        <!-- Folder of LogParser job-configurations -->
        <add key="JobFolder" value="App_Data/jobs"/>
        <!-- Background task execution interval in seconds -->
        <add key="Interval" value="5"/>
        <!-- Message offset in seconds. Reads older messages to circumvent log4net timestamp bug -->
        <add key="Offset" value="7200"/>
        <!-- Caching duration for hash …
Run Code Online (Sandbox Code Playgroud)

.net c# .net-core

2
推荐指数
2
解决办法
1433
查看次数

标签 统计

.net ×1

.net-core ×1

c# ×1