February 2010
Beginner
400 pages
11h 13m
English
In our previous example, we set a base address for our service to listen to (http://localhost:8888/Chapter7) with the following code, but we didn't actually create any endpoints:
ServiceHost MyServiceHost =
new ServiceHost(typeof(Chapter7.ConfiglessService.Service1),
new Uri("http://localhost:8888/Chapter7"));
In WCF4, if you don't specify any endpoints in code or by configuration, then WCF will automatically create a default endpoint for your service (one for each interface your service implements).
The type of endpoint that gets created is dependent on what you use as the base address. In this case, a basicHttpBinding was created, as we used an address starting with http://. However, if the address ...