I created a WCF service, it works well in IE addr, but as soon as I add it to wcftestclient and call the method, an error occurred and was shown as:
Failed to call the service. Possible reasons: the service is unavailable or unavailable; client side configuration does not match proxy; existing proxy is invalid. See stack trace for more details. You can try restoring by starting a new proxy server, restoring the default configuration, or updating the service.
Error Details:
The Address property on ChannelFactory.Endpoint was null. The ChannelFactory Endpoint must have a valid Address specified.
at System.ServiceModel.ChannelFactory.CreateEndpointAddress(ServiceEndpoint endpoint)
at System.ServiceModel.ChannelFactory`1.CreateChannel()
at System.ServiceModel.ClientBase`1.CreateChannel()
at System.ServiceModel.ClientBase`1.CreateChannelInternal()
at System.ServiceModel.ClientBase`1.get_Channel()
at MyDownloadSvcClient.DeleteMyFolder(Int32 UserId, Int32 FolderId)
Configuration file: (updated on 10/9)
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<services>
<service name="MyDownloadSvcClient">
<endpoint binding="basicHttpBinding" />
</service>
</services>
<bindings />
<client>
<endpoint address="http://localhost/MyDownloadSvc.svc"
binding="basicHttpBinding" bindingConfiguration="" contract="IMyDownloadSvc"
name="Test" />
</client>
</system.serviceModel>
</configuration>
Is there something wrong?
Thanks in advance, Elaine
source
share