Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF ServiceRoute and Tcp

Tags:

c#

wcf

I have a WCF application hosted in IIS in which i use WsHttpBinding, with aspnetCompatibility since i want to use RouteTable 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 ?

like image 427
np-hard Avatar asked Nov 05 '22 00:11

np-hard


1 Answers

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

like image 82
larsw Avatar answered Nov 15 '22 06:11

larsw