![IIS 7 - 虚拟路径“null”映射到另一个应用程序,这是不允许的](https://linux22.com/image/579185/IIS%207%20-%20%E8%99%9A%E6%8B%9F%E8%B7%AF%E5%BE%84%E2%80%9Cnull%E2%80%9D%E6%98%A0%E5%B0%84%E5%88%B0%E5%8F%A6%E4%B8%80%E4%B8%AA%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%EF%BC%8C%E8%BF%99%E6%98%AF%E4%B8%8D%E5%85%81%E8%AE%B8%E7%9A%84.png)
我在设置 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 移动到各个站点(这只是您运行服务器场的站点)。