Tuesday, October 07, 2008

The Address property on ChannelFactory.Endpoint was null

You created web service client, set up config file using Service Configuration Editor and you get

The Address property on ChannelFactory.Endpoint was null

message

You probably forgot to add configuration name in

new ChannelFactory();

method

3 comments:

Anonymous said...

I am getting that message when im testing my service with wcf test client.
Where I can add conf name.

Mijalko said...

If you have in config:

system.serviceModel
bindings
wsHttpBinding
binding name="WSHttpBinding_IMyUserService" closeTimeout="00:01:00" openTimeout="01:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"
.
.
.

you will need to set:
ChannelFactory-MyWebService.IMyUserService- factory = new ChannelFactory -MyWebService.IMyUserService-("WSHttpBinding_IMyUserService");

Mijalko said...

(I cannot paste LT and GT signs in comment)