views:

257

answers:

1

Hi all,

I am struggling with a WCF issue relating to name resolution-or something like so. When I consume a wcf service (netTcpBinding) on an application server via a web application on the web server it doesn't work. Ok it doesn't work in most situations. If you access the web application from the web server itself using localhost or 127.0.0.1 it works. However accessing it through the web server via another client machine or accessing the web application locally on the web server using the host name or IP address does not work. In both instances you get a socket connection aborted error.

What makes it more interesting is that switching all the security to 'none' as opposed to 'transport' resolves the issue.

My question is, is it possible to access wcf services using your web server and still use transport security? Or is this a bug/designed behaviour?

Many thanks for any insight, Steve

+1  A: 

Transport security typically only works point-to-point - when the client connects directly to the server.

If you have clients that come in from the internet, you have no control over how many intermediary hops they go through - so Transport security, even if you get it to work, will most likely not work at all, e.g. your message might be protected from the client to the first hop, and from the last hop to your server - but not in between hops.

For an internet scenario, typically, Transport security is not a valid option - use Message Security for those cases.

I'm not 100% sure why the connection wouldn't work at all - but in any case, if you're not behind a corporate firewall, I wouldn't be using netTcp with transport security in such a scenario.

Could you please add your server side config (anything inside <system.serviceModel>) to your question to see how you set up Transport security?

marc_s
Mi Marc thanks for the assistance. That does make sense but I would have thought it should technically be ok to protect the communication between web server and wcf-since I control each hop anyway (as part of a multitiered application). I will try post some code/markup soon when I have access again.
MrCraze