使用 IIS ARR 路由 SOAP 请求

发布于 2024-12-29 09:12:29 字数 1161 浏览 1 评论 0 原文

情况是,我们有一些 SOAP (asmx) 服务,其版本依赖于第三方软件。这些服务驻留在domainA 上。

我们正在迁移到新版本的第 3 方软件,由于版本不兼容,现有 SOAP 服务将无法驻留。目前升级后的内容位于 temp.domainA 上。

我们正在开发新的服务来取代旧的 SOAP 服务,并将插入 wcf 路由或其他东西,以将我们从下一个 3rd 方版本升级派对中拯救出来。

理想情况下,一旦 temp.domainA 准备就绪,我们将将该 dns 切换为domainA,并将旧的domainA 更改为old.domainA,以破坏引用soap 服务的所有现有应用程序。

我一直在闲逛 IIS 和 ARR 匹配肥皂服务具有的通用命名约定,并尝试路由这些请求。这对于 Get 请求非常有效,但对于肥皂使用的 POST 请求则不太有效。

我通过运行 2 个相同的服务(一个在测试服务器上,一个在我的本地计算机上)来设置一个小测试。我本地计算机上的数据返回的数据与测试服务器上的数据不同,因此我可以知道正在调用哪一个。

我在本地 iis 中设置了 ARR 的代理作为测试服务器上服务的反向代理。我设置了一个 url 重写规则来根据 SOAP 服务 url 的命名约定检查传入请求。

如果我通过浏览器浏览到肥皂端点,并且 httpget 的一切都会按计划进行。我从远程测试服务器收到来自本地主机的请求的响应。

当我运行测试应用程序时,它会进行相同的调用,除了作为带有肥皂的帖子之外,我收到此错误

exception.message: There was no Endpoint Listening at http://localhost/webservice/Default.asmx that can receive the message 。这通常是由不正确的地址或 SOAP 操作引起的。有关更多详细信息,请参阅 InnerException(如果存在)。 异常。InnerException:远程服务器返回错误:(404)未找到。

我的设置

然后对于代理类型,我

  • 使用 url 重写来检查检查
  • 启用 ssl 卸载检查
  • 和反向代理:设置为remote.test.server

The situation is that we have some SOAP (asmx) services that are version dependent upon a 3rd party software. These services reside on domainA.

We are in the process of migrating to a new version of the 3rd party software where the existing SOAP services will not be able to reside because of a version incompatibility. Currently the upgraded stuff lives on temp.domainA.

We are developing new services to replace the old SOAP services and will plug in wcf routing or something to save us from the next 3rd party version upgrade party.

Ideally, once temp.domainA is all ready to go we will switch that dns to be domainA and change the old domainA to be old.domainA there for breaking all existing applications referencing the soap services.

I've been fooling around with IIS and ARR matching on a common naming convention that the soap services have and trying to have those requests routed. This works very well for Get requests but not so well for POST requests which is what soap uses.

I set up a little test by having 2 identical services running, one on a test server and one on my local machine. The one on my local machine returns different data than the one on the test server so I can tell which one is being invoked.

I set up ARR's proxy in my local iis to be a reverse proxy to the service on the test server. I set up a url rewrite rule to inspect the incoming requests based on the naming convention of the soap service url.

If I browse to the soap endpoint via a browser and httpget's everything works as planned. I get a response from the remote test server with the request originating from localhost.

When I run the test app which makes the same call except as a post with soap I get this error

exception.message: There was no endpoint listening at http://localhost/webservice/Default.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
exception.InnerException: The remote server returned an error: (404) Not Found.

my settings

enter image description here

and then for Proxy Type i have

  • use url rewrite to inspect checked
  • enable ssl offloading checked
  • and reverse proxy: set to remote.test.server

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文