2

我正在尝试预编译托管在 IIS 7.5 中的 .NET 站点。该站点是在 .net 中构建的,并且还指包含文件。对于包含文件,我们创建了单独的 .inc 文件,这些文件被称为 from.cs 文件。现在,当我们尝试通过 aspnet_compiler 编译站点时,我们收到以下错误消息。有什么帮助吗?

错误 ASPRUNTIME:Failed to map the path '/Includes/usercontext.inc'.

[InvalidOperationException]: Failed to map the path '/Includes/usercontext.inc'.
   at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull)
   at System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath)
   at System.Web.Hosting.MapPathBasedVirtualFile.EnsureFileInfoObtained()
   at System.Web.Hosting.MapPathBasedVirtualFile.Open()
   at System.Web.Hosting.VirtualPathProvider.OpenFile(String virtualPath)
   at System.Web.UI.DependencyParser.ParseFile(String physicalPath, VirtualPath virtualPath)
   at System.Web.UI.DependencyParser.ProcessServerInclude(Match match)
   at System.Web.UI.DependencyParser.ParseString(String text)
   at System.Web.UI.DependencyParser.ParseFile(String physicalPath, VirtualPath virtualPath)
   at System.Web.UI.DependencyParser.GetVirtualPathDependencies()
   at System.Web.Compilation.TemplateControlBuildProvider.GetBuildResultVirtualPathDependencies()
   at System.Web.Compilation.WebDirectoryBatchCompiler.GetBuildResultDependencies()
   at System.Web.Compilation.WebDirectoryBatchCompiler.Process()
   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.PrecompileAppInternal(VirtualPath startingVirtualDir)
   at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirtualDir)
   at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallback callback)
   at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback)
   at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCallback callback)
   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)
4

1 回答 1

0

早些时候我试图用

aspnet_compiler.exe -v<virtual path> -p<physical path> -errorstack >><filename>

但是当我使用以下命令对其进行更改时,这个问题得到了解决。但我不知道背后的原因是什么。

aspnet_compiler.exe -m <metabase path> -errorstack >><filename>
于 2012-11-22T08:22:13.180 回答