Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

error while adding wcf service reference in windows app

149 views
Skip to first unread message

prad

unread,
Feb 26, 2009, 9:02:31 PM2/26/09
to
Hi there,

I have created a sample WCF webservice hosted in windows service. i
had build it no errors!! started windows service running successfuly.
later i hav created win form client to use that webservice. when i try
add the service reference it gives me the following error:

when i say net.tcp://localhost:8080/WindowsServiceWCF i got the error
as:

Metadata contains a reference that cannot be resolved: 'net.tcp://
localhost:8080/WindowsServiceWCF'.
The socket connection was aborted. This could be caused by an error
processing your message or a receive timeout being exceeded by the
remote host, or an underlying network resource issue. Local socket
timeout was '00:05:00'.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the
solution and adding the service reference again.

For: http://localhost:8000/WindowsServiceWCF

There was an error downloading 'http://localhost:8000/
WindowsServiceWCF'.
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/WindowsServiceWCF'.
Could not connect to http://localhost:8000/WindowsServiceWCF. TCP
error code 10061: No connection could be made because the target
machine actively refused it 127.0.0.1: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
If the service is defined in the current solution, try building the
solution and adding the service reference again.

For: net.pipe://localhost/WindowsServiceWCF

Metadata contains a reference that cannot be resolved: 'net.pipe://
localhost/WindowsServiceWCF'.
There was no endpoint listening at net.pipe://localhost/
WindowsServiceWCF that could accept the message. This is often caused
by an incorrect address or SOAP action. See InnerException, if
present, for more details.
The pipe endpoint 'net.pipe://localhost/WindowsServiceWCF' could not
be found on your local machine.
If the service is defined in the current solution, try building the
solution and adding the service reference again.


Here is my app config code:

<configuration>
2 <system.serviceModel>
3 <services>
4 <service name ="WindowsServiceWCF.Service1"
5 behaviorConfiguration="metadataSupport">
6 <host>
7 <baseAddresses>
8 <add baseAddress="net.pipe://localhost/WindowsServiceWCF"/>
9 <add baseAddress="net.tcp://localhost:8000/WindowsServiceWCF"/>
10 <add baseAddress="http://localhost:8000/WindowsServiceWCF"/>
11 </baseAddresses>
12 </host>
13 <endpoint address="tcpmex"
14 binding="mexTcpBinding"
15 contract="IMetadataExchange"/>
16 <endpoint address="namedpipemex"
17 binding="mexNamedPipeBinding"
18 contract="IMetadataExchange"/>
19 <endpoint address="" binding="wsHttpBinding"
20 contract="WindowsServiceWCF.IServiceClass"/>
21 <endpoint address="mex" binding="mexHttpBinding"
22 contract="IMetadataExchange"/>
23 </service>
24 </services>
25 <behaviors>
26 <serviceBehaviors>
27 <behavior name="metadataSupport">
28 <serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
29 </behavior>
30 </serviceBehaviors>
31 </behaviors>
32 </system.serviceModel>
33 </configuration>

0 new messages