WCF ServiceRoute and Tcp
I have a WCF application hosted in IIS in which i use WsHttpBinding, with aspnetCompatibility since i want to use Rout开发者_如何转开发eTable functionality to route many calls to a single service.
every thing worked as expected, no problems here.
Then i added a tcp endpoint to the service(using its original url), and called the service using client, everything worked here, without a problem.
Then i modified the client url with routed url, and called the method using tcp endpoint, i got a socket error, which is what i expected.
But then i ran the wsHttp client with the routed url (which worked), and ran the tcp client with the routed url (which surprisingly worked)
Are tcp requests and http requests being routed through the same pipeline ?
As far as I know, the System.Web.Routing scenario is only supported for HTTP-based endpoints, since the netTcpBinding really doesn't use URLs in the same way.
--larsw
According to Microsoft's documentation on ServiceRoute, it is only designed to support extension-less base addresses over HTTP transport.
精彩评论