appConfig无法识别的配置节system.webServer

时间:2020-09-29 17:14:18

标签: asp.net-core .net-core paypal

美好的一天。 我在设置app.config时遇到问题。

当我尝试从appConfig访问PayPal节点时,问题就开始了。
我遇到以下错误“无法识别的配置部分system.webServer。”

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <remove name="aspNetCore"/>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
    <security>
      <requestFiltering>
        <!-- This will handle requests up to 100MB -->
        <requestLimits maxAllowedContentLength="102400" />
      </requestFiltering>
    </security>
  </system.webServer>
  <configSections>
    <section name="paypal" type="PayPal.SDKConfigHandler, PayPal" />
  </configSections>
  <paypal>
    <settings>
      <add name="mode" value="sandbox"/>
      <add name="clientId" value="xxx"/>
      <add name="clientSecret" value="xxx"/>
    </settings>
  </paypal>
</configuration>

0 个答案:

没有答案