I have a .NET 4.0 WCF service that's implemented with the Dependecy Injection pattern using Castle Windsor (v3). The service is hosted in IIS 7 and I use the Visual Studio Development Server when running locally. My dev server assigns a specific port to the service.

Now, if I don't add a base address I will get an exception from Castle Windsor saying:

Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [].

But, if I do assign a localhost address with the same port as my developer server, I get a port conflict.

Why do I need a base address in this case, and how do I handle the port conflict?

Here's my Castle Windsor-related code. The container is created in my Application_Start() in the Global.asax.cs file.

And for the record, my configuration was set up as suggested by Sir Hally, and that's when the port conflict appeared. With the additional fluent configuration above, I removed the base address configuration from the web.config.