gpt4 book ai didi

c# - AppHarbor 预编译错误

转载 作者:太空狗 更新时间:2023-10-29 23:47:12 25 4
gpt4 key购买 nike

在部署到 AppHarbor 时,AppHarbor 给了我以下编译输出:

Microsoft (R) ASP.NET Compilation Tool version 4.0.30319.17929
Utility to precompile an ASP.NET application
Copyright (C) Microsoft Corporation. All rights reserved.

D:\temp\cprt3dr0.2g3\output\_PublishedWebsites\WebMatrixWebsite\gnsystem\gnsystem\web.config(24): error ASPCONFIG: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

[ConfigurationErrorsException]: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (D:\temp\cprt3dr0.2g3\output\_PublishedWebsites\WebMatrixWebsite\gnsystem\gnsystem\web.config line 24)
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
at System.Web.Configuration.RuntimeConfig.get_Compilation()
at MTConfigUtil.GetCompilationConfig(String vpath)
at System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir)
at System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors)
at System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors)
at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
at System.Web.Compilation.BuildManager.PrecompileWebDirectoriesRecursive(VirtualDirectory vdir, Boolean topLevel)
at System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath startingVirtualDir, IEnumerable`1 excludedVirtualPaths)
at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirtualDir, IEnumerable`1 excludedVirtualPaths)
at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallback callback, IEnumerable`1 excludedVirtualPaths)
at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback, List`1 excludedVirtualPaths)
at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback, List`1 excludedVirtualPaths)
at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback, Boolean forceCleanBuild)
at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuildManagerCallback callback)
at System.Web.Compilation.Precompiler.Main(String[] args)




Website precompilation failed with exit code 1. Precompilation can optionally be disabled in application settings

在互联网上搜索后,我找到了一些解决方案,指导我清理我的解决方案并将我的应用程序文件夹配置为 IIS 中的虚拟文件夹。

我做了第一个(但没有用),但我不知道如何在 AppHarbor 中做第二个,有什么建议吗?

编辑1: Web.Config

最佳答案

您可以在应用程序设置中禁用 View 预编译。那应该可以引导您解决问题。

但我建议你检查你的代码,因为最终在使用时,会再次抛出这个异常,我推荐一些跟踪器,比如 elmha帮助您详细查找问题。你的 webconfig 错误在那里是钢铁

关于c# - AppHarbor 预编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12428357/

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