the problem : when adding service reference -> chosing the address http://localhost:8000 -> pressing GO
There was an error downloading 'http://localhost:8000'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8000
Metadata contains a reference that cannot be resolved: 'http://localhost:8000/'.
There was no endpoint listening at http://localhost:8000/ that could accept the message.
This is often caused by an incorrect address or SOAP action.
See InnerException, if present, for more details.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:8000
If the service is defined in the current solution, try building the solution and adding the service reference again.
The service contract :
[ServiceContract(Namespace="http://www.thatindigogirl/2011/12")]
public interface IHelloIndigo
{
[OperationContract]
void DoWork();
}
The service :
public class HelloIndigo : IHelloIndigo
{
public void DoWork()
{
throw new NotImplementedException();
}
}
The host's app.config
:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="serviceBehavior" name="HelloIndigo">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000" />
</baseAddresses>
</host>
<endpoint address="HelloIndigoService" binding="basicHttpBinding"
name="basicHttp" contract="Host.IHelloIndigo" />
<endpoint binding="mexHttpBinding" name="mex"
contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
- This solution was rebuilt from an vs2008 to vs2010 I changed the framework to 4.0 in both projects client and host .
- The configurations were made by the wcf configuration wizard.
Any idea why the client project can't locate the host end point to retrieve the metadata ?
Thanks in advance.