【发布时间】:2020-11-30 02:27:18
【问题描述】:
我有带有 WCF 服务的 Asp.net MVC 4 应用程序。项目托管在 iis 生产服务器 P125 (10.10.10.125) 中,同一服务器上托管的其他站点很少。我们的 Web / 前端服务器用作生产服务器的反向代理(已安装 URL 重写和应用程序请求路由),
185.132.x.x 是仅作为反向代理的 Web 服务器的公共 IP (Windows Server 2016)。
我们的应用程序托管在应用程序服务器 ip 10.10.10.125 的端口 8899
185.132.x.x:8080 10.10.10.125:8899
网站运行良好,MVC 应用程序的所有页面/操作都运行良好,除了服务(rest.svc,winact.svc)
每当我们点击 185.132.x.x:8080/rest.svc 时都会显示错误:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /rest.svc
我不知道为什么? 我们所有的服务都显示相同的错误,而服务在本地网络以及 WebServer 本身的 10.10.10.125:8899/rest.svc 上运行良好。
远程登录 WebServer(185.132.xx) 并通过 10.10.10.125:8899 浏览/访问应用程序和服务 (.svc),它工作正常。
我正在使用反向代理:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://10.10.10.125:8899/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
【问题讨论】:
标签: asp.net asp.net-mvc url-rewriting reverse-proxy arr