Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WCF Win2008-R2
Hi,
 
I have created a windows service and added that service reference to my metro application.
 
I have created a package and installed the package in another system and also the windows service. The application has installed successfully. Now I try to run the application. the below exception is thrown while calling the service.
 
There was no endpoint listening at "http://localhost:8732/Design_Time_Addresses/TFSClientWindowsService/TFSCClientWindowsService/ that could accept the message. This is often caused by incorrect address or SOAP action.
InnerException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host failed to respond at 127.0.0.1:8732
 
Below is my config settings at service level:
<?xml version="1.0"?>
<configuration>
    <system.serviceModel>
        <behaviors>
            <serviceBehaviors>
                <behavior name="MyBehavior">
                    <serviceMetadata httpGetEnabled="true"/>
                    <serviceDebug includeExceptionDetailInFaults="true"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <services>
            <service name="TFSClientWindowsService.TFSCClientWindowsService" behaviorConfiguration="MyBehavior">
                <endpoint address="" binding="basicHttpBinding" contract="TFSClientWindowsService.ITFSCClientWindowsService">
                    <identity>
                        <dns value="localhost"/>
                    </identity>
                </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                <host>
                    <baseAddresses>
                        <add baseAddress="http://localhost:8732/Design_Time_Addresses/TFSClientWindowsService/TFSCClientWindowsService/"/>
                    </baseAddresses>
                </host>
            </service>
        </services>
    </system.serviceModel>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
</configuration>
 

when I install the package and access the service it is functioning correctly. but nto when I install it in another system.
Posted 28-Aug-12 4:19am
kaakad404
Comments
ryanb31 at 28-Aug-12 12:04pm
   
The error is telling you what is wrong. My guess is you need to put the server name in instead of localhost or possibly the IP but likely that is where the issue is.
Amund Gjersøe at 28-Aug-12 16:47pm
   
This is my assumption: Since you have put both the service and the client on an other machine, it should have worked if Visual Studio was installed on that as well (hosting the 8732 port). If VS isn't installed, you could simply just use a named pipe binding "net.pipe//localhost/MyPipe" instead.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here's your clue:
 
http://localhost:8732/Design_Time_Addresses/TFSClientWindowsService/TFSCClientWindowsService/
 
Do you know what 'localhost' is? It's the local machine. You're telling your web service client to go and find a service on the same machine! Of course that works on your dev machine and not when you try installing it somewhere else!
 
You need to replace localhost:8732 with wherever the visible, deployed service provider is hosted.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi Bobjanova,
 
Thanks for your response.
 
I basically created a windows service setup and metro application Package.
 
Now I install both service and package in other machine . So service should be local for that machine.
 
I have also removed the port and gave the base address as
http://localhost/TFSClientWindowsService/TFSCClientWindowsService/[
 
I again get the same issue.
 
I'm getting the wsdl in that machine when I browser the address. Couldn't figure out what went wrong
  Permalink  

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

  Print Answers RSS
0 Nirav Prabtani 343
1 OriginalGriff 207
2 Mika Wendelius 185
3 CPallini 179
4 Sergey Alexandrovich Kryukov 176
0 Nirav Prabtani 398
1 OriginalGriff 292
2 Sergey Alexandrovich Kryukov 251
3 Mika Wendelius 185
4 Abhinav S 180


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 29 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100