简体   繁体   中英

Issue with site pre-compile hosted in IIS 7.5

I am trying to pre-compile a .NET site which is hosted in IIS 7.5. This site is build in .net and also referring to includes files. For includes file we have created separate .inc files which are called from.cs files. Now when we are trying to compile the site through aspnet_compiler, we are getting below error message. Any help?

Error 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)

Earlier I was trying to compile with

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

But when I chnaged it with the following command, thsi issue get resolved. But I don't know what is the reason behind it.

aspnet_compiler.exe -m <metabase path> -errorstack >><filename>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM