Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AppHarbor pre-compilation error

While deploying to AppHarbor, AppHarbor gave me the following compile output:

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

After searching in the internet, I found a few solutions pointing me over to clean my solution and to configure my app folder as a virtual folder within IIS.

I did the first (and it didn't work) but I have no idea how to do the second from within AppHarbor, any suggestions?

Edit1: Web.Config

like image 935
Gilad Naaman Avatar asked Nov 12 '22 22:11

Gilad Naaman


1 Answers

You can disable view pre-compilation in application settings. That should steer you clear of the problem.

But I recommend that you check your code because eventually when used, will be thrown this exception again, I recommend some tracers like elmha to help you find the problem in detail. Your webconfig error is steel there

like image 165
cyberdantes Avatar answered Nov 15 '22 12:11

cyberdantes