Saturday, October 10, 2009

Default Endpoints in WCF 4.0

One of the hardest things in WCF is its configuration. When you try to host a service without an endpoint declared in the configuration, an exception is thrown (a classic mistake).

But this will change with the new version of the framework (in fact it has already changed in the beta 1).

When you are hosting a service without any endpoint configured, the ServiceHost will read the service’s Uri and will create a default endpoint choosing one of de following bindings:
- http: basicHttpBinding
- net.tcp: netTcpBinding
- net.pipe: netNamedPipeBinding
- net.msmq: netMsmqBinding

More information: A Developer’s Introduction to Windows Communication Foundation (WCF) .NET 4 Beta 1

0 comments: