gpt4 book ai didi

c#-4.0 - 目录 '/website/App_Code/' 不允许,因为应用程序是预编译的

转载 作者:行者123 更新时间:2023-12-03 08:40:14 24 4
gpt4 key购买 nike

如何解决在运行预编译的 Web 应用程序时遇到的以下问题?

Server Error in '/CRM' Application.
The directory '/CRM/App_Code/' is not allowed because the application is precompiled.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The directory '/CRM/App_Code/' is not allowed because the application is precompiled.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): The directory '/CRM/App_Code/' is not allowed because the application is precompiled.]
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +8777420
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
System.Web.Compilation.BuildManager.CompileCodeDirectories() +387
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +248

[HttpException (0x80004005): The directory '/CRM/App_Code/' is not allowed because the application is precompiled.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +421
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +605

[HttpException (0x80004005): The directory '/CRM/App_Code/' is not allowed because the application is precompiled.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8946484
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

最佳答案

根据您的情况,存在三种可能的情况:

查看此链接 http://www.beansoftware.com/ASP.NET-FAQ/Directory-App_Code-Not-Allowed.aspx

基本上,如果你预编译了你的应用程序,就不应该有 App_Code 文件夹。如果您稍后添加它,则应将其删除。

或者

可能不知何故,预编译的.config 文件已投入生产。删除该文件应该可以解决 App_Code 目录错误。

关于c#-4.0 - 目录 '/website/App_Code/' 不允许,因为应用程序是预编译的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24484888/

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