I am hosting WCF services in IIS. I have multiple hostname bindings set up in IIS for the site. However, when making requests to any of the non-default bindings, the correct url doesn't get reported by the OperationContext.IncomingMessageProperties.Via property. The URL that gets reported uses the default binding's hostname as the base, with same path and querystring.
For example, assuming the following bindings:
http://subfoo.services.myapp.com (first/default entry)
http://subbar.services.myapp.com
When making a request to: http://subbar.services.myapp.com/someservice?id=123
The Via property reports the request URI as: http://subfoo.services.myapp.com/someservice?id=123
How can I get the URL with the actual hostname that was requested?