IIS 7 - 虚拟路径“null”映射到另一个应用程序,这是不允许的

IIS 7 - 虚拟路径“null”映射到另一个应用程序,这是不允许的

我在设置 IIS 7 Farm 进行负载平衡时遇到了问题。向 IIS Farm 添加 4 台服务器,并设置适当的端口(8080、8081、8082、8083)。还为 IIS Farm 添加入站规则。Tomcat 实例监听这些端口。当我打开 URL(我在入站规则中设置)时,出现以下异常:

The virtual path 'null' maps to another application, which is not allowed.     
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:     
[ArgumentException: The virtual path 'null' maps to another application, which is not allowed.]
   System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +8839122
   System.Web.HttpContext.GetFilePathData() +36
   System.Web.HttpContext.GetConfigurationPathData() +26
   System.Web.Configuration.RuntimeConfig.GetConfig(HttpContext context) +43
   System.Web.Configuration.CustomErrorsSection.GetSettings(HttpContext context, Boolean canThrow) +41
   System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow, Boolean localExecute) +101
   System.Web.HttpContext.ReportRuntimeErrorIfExists(RequestNotificationStatus& status) +538

我该如何解决这个问题?

答案1

这是一个IIS 错误。要么升级到 Server 2008 R2,要么将重写规则从 globalRules 移动到各个站点(这只是您运行服务器场的站点)。

相关内容