I am trying to create a simple ConsoleApplication in which i would like to host a simple wcf service.
Here is the code for my
namespace HostConsoleA
Well, I think the problem is this:
Basically if you want to use MEX over http, you need to supply either a full address for the MEX endpoint, or a http base address (if you only specify a relative address).
Solution 1: specify a full address for the MEX endpoint:
......
Solution 2: define an HTTP base address, too:
Solution 3: use the mexTcpBinding instead
......
Any of those three options should should solve it.
A word of caution: I find it quite risky to call your service behavior configuration "ServiceBehavior"......
My recommendation: call your first and default configuation just plain "Default" (or "DefaultBehavior")
and only start giving out other names if you have multiple configurations.
Calling this ServiceBehavior just seems to be asking for trouble some time later on.....