Click here to Skip to main content
15,887,416 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,
I have been hosted my wcf service in iis, My Service is: http://localhost/MyWcfService/Service1.svc?wsdl. but when I am adding service reference to an application there is raising an error

The error IS:

C#
"Metadata contains a reference that cannot be resolved: http://localhost/MyWcfService/Service1.svc?wsdl.
The WSDL document contains links that could not be resolved.
There was an error downloading http://localhost/MyWcfService/Service1.svc?xsd=xsd0.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host"


Kindly help...

Is proxy creation necessary ? I have not created the proxy yet.
Posted
Updated 25-Oct-13 20:40pm
v2

May be the problem with service configuration.

C#
<system.servicemodel>
  <services>
    <service name="WcfService_using_callbacks_via_tcp.Service1">
      behaviorConfiguration="Behavior_Service1">
      <host>
        <baseaddresses>
          <add baseaddress="net.tcp://localhost:5050/Service1" />
        </baseaddresses>
      </host>
      <endpoint address="" contract="WcfService_using_callbacks_via_tcp.IService1">
         binding="netTcpBinding" bindingConfiguration="DuplexNetTcpBinding_IService1" />
      <endpoint address="mex" contract="IMetadataExchange" binding="mexTcpBindng" />
    </endpoint></service>
  </services>
  ...
</system.servicemodel>


For more info : SOF

I hope this will help to you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900