Routing WCF Traffic Based on URI Domain Requested
Posted
by Ian Patrick Hughes
on Stack Overflow
See other posts from Stack Overflow
or by Ian Patrick Hughes
Published on 2010-06-16T21:48:03Z
Indexed on
2010/06/16
21:52 UTC
Read the original article
Hit count: 254
Is there a way to route traffic to a target WCF service file based on the URL domain requested?
Basically, I have a single WCF RESTful services project with 3 service files offering different endpoints. It's hosted on a single IIS6 site looking for multiple host header values on port 80. I want to route traffic to different services files whether the requester is asking for www.site1.com, www.site2.com, or www.site3.com.
Seems like the sort of thing I would use a global.asax or HTTP Handler for, but I am not sure since this is a regular WCF Service Application. Even though I am on IIS6 for this project, I don't mind using a URL re-writer and wildcard mapping, if I have to. I have admin rights on the balanced servers where this will reside, I just want to know if there is a common/best practice before I start hacking my way around this.
© Stack Overflow or respective owner