Is it possible to use the new WCF routing service in WCF4 for REST based services? I have something like a reverse proxy in my mind. In fact, I have a lot of self-absorbed comfort based serivs, which I want to highlight with the same base URL and port via IIS. Routing URL should be done by the last part of the URL. I'm completely new to the new WCF routing service, so please forgive me that this is a silly question, but I did not get any information about it on the web.
I have tried to do something like this (where serivce1 / 2 are self-reliant services):
& lt; System.serviceModel & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior Name = "Routing Beaver" & gt; & Lt; Routing PathOnheadersOnly = "False" filterable name = "routing table" /> & Lt; Service debug includes ExceptionDetailInFaults = "true" /> & Lt; ServiceMetadata httpGetEnabled = "true" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt; & Lt; Services & gt; & Lt; Service transaction support = "routingbavier" name = "system servicemodel routing. Routing service" & gt; & Lt; Endpoint address = "myservices" contract = "System.ServiceModel.Routing.IRequestReplyRouter" binding = "basic HttpBinding" /> & Lt; / Services & gt; & Lt; / Services & gt; & Lt; Route & gt; & Lt; FilterTables & gt; & Lt; FilterTable name = "routing" & gt; & Lt; Add filterName = "Service1Filter" priority = "0" endpointName = "Service1" /> & Lt; Add filterName = "Service2Filter" priority = "0" endpoint = "Service2" /> & Lt; / FilterTable & gt; & Lt; / FilterTables & gt; & Lt; Filter & gt; & Lt; Filter Name = "Service 1 Filter" filter type = "Match all" /> & Lt; Filter Name = "Service 2 Filter" filter type = "Match all" /> & Lt; / Filters & gt; & Lt; / Route & gt; & Lt; Customers & gt; & Lt; Endpoint address = "http: // somehost: 8888 / test / service1" binding = "basicHttpBinding" contract = "*" name = "service1" /> & Lt; Endpoint address = "http: // somehost: 8732 / test / service2" binding = "basic HttpBinding" contract = "*" name = "service2" /> & Lt; / Customer & gt; & Lt; Service Hosting Environment Multiple Site EndingEnited = "True" /> & Lt; /system.serviceModel> but it does not appear to be working. I did not get an endpoint. I did not get the exception. The original address of the selfless service is not the actual endpoint. Can I do routing based on the base address (or if the rest routing is possible) would I have to add a route to every ending point?
I solved the problem using a reverse proxy (in my case arr). I do not know about this that it is possible to use the WCF routing service for this purpose, but it is possibly misused.
Comments
Post a Comment