gpt4 book ai didi

visual-studio-2015 - 元素 'system.webServer' 具有无效的子元素 'aspNetCore'

转载 作者:行者123 更新时间:2023-12-03 14:21:59 25 4
gpt4 key购买 nike

我从 Visual Studio 2015 中的一个模板创建了一个新的 ASP.NET Core MVC 6 应用程序。

我正在看的教程说要修改 web.config文件。当我打开该文件时,Visual Studio 会引发警告:

Severity Code Description Project File Line Suppression State
Warning The element 'system.webServer' has invalid child element 'aspNetCore'. List of possible elements expected: 'asp, caching, cgi, defaultDocument, directoryBrowse, globalModules, handlers, httpCompression, webSocket, httpErrors, httpLogging, httpProtocol, httpRedirect, httpTracing, isapiFilters, modules, applicationInitialization, odbcLogging, security, serverRuntime, serverSideInclude, staticContent, tracing, urlCompression, validation, management, rewrite'.



这里是处女 web.config文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->

<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"/>
</system.webServer>
</configuration>

如何消除警告?

最佳答案

安装 .NET Core Tooling Preview 2 for Visual Studio 2015 .

您可以从 the .NET Downloads page 下载它

如果它已经安装并且它不起作用,您可以尝试进行修复:转到程序和功能,选择 Microsoft .NET Core 1.0.1 - VS 2015 Tooling Preview 2,单击更改,然后修复。

关于visual-studio-2015 - 元素 'system.webServer' 具有无效的子元素 'aspNetCore',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37945539/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com