简体   繁体   English

来自IIS的基于自定义逻辑的转发请求

[英]Forward request from IIS based on custom logic

I want to forward rest service request coming to Server A to Server B and C. 我想将来自服务器A的其余服务请求转发到服务器B和C。

The condition to forward depends upon data coming. 转发的条件取决于数据的到来。 The condition is pretty complex and I would have to make a DB call to know where the request should go. 条件非常复杂,我必须打个数据库电话才能知道请求应该去哪里。

Does anyone know hows to achieve this in IIS. 有谁知道如何在IIS中实现这一目标。

I am not able to change client code at all. 我根本无法更改客户端代码。

Thanks, Guy 谢了,兄弟们

I don't think IIS can do this all alone but WCF Routing (introduced in 4.0) should be able to do it. 我不认为IIS可以单独完成所有任务,但是WCF路由(4.0中引入)应该可以做到。

You can have a router service which will route the request as per routing table. 您可以拥有一个路由器服务,该服务将按照路由表路由请求。

The routing table routes the request on the basis of parameters (filterdata) 路由表根据参数(filterdata)路由请求

Introduction to routing http://msdn.microsoft.com/en-us/library/ee517422.aspx 路由简介http://msdn.microsoft.com/en-us/library/ee517422.aspx

Something similar to your requirement http://blogs.profitbase.com/tsenn/?p=23 类似于您的要求http://blogs.profitbase.com/tsenn/?p=23

Thanks, 谢谢,

A 一种

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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