本文介绍了连接尝试失败,因为一段时间后被连接方未正确响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经创建了Windows服务,并将该服务引用添加到我的Metro应用程序中.

我已经创建了一个程序包,并将该程序包安装在另一个系统以及Windows服务中.该应用程序已成功安装.现在,我尝试运行该应用程序.调用服务时抛出以下异常.

在"http://localhost:8732/Design_Time_Addresses/TFSClientWindowsService/TFSCClientWindowsService/上没有侦听终结点的端点可以接受消息.这通常是由于地址或SOAP操作不正确引起的.
InnerException:连接尝试失败,因为一段时间后连接方未正确响应,或者建立连接失败,因为连接的主机未能在127.0.0.1:8732响应
以下是我在服务级别上的配置设置:

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>




当我安装软件包并访问服务时,它运行正常.但是当我将其安装在另一个系统中时,此操作仍为nto.




when I install the package and access the service it is functioning correctly. but nto when I install it in another system.

推荐答案



这篇关于连接尝试失败,因为一段时间后被连接方未正确响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 06:00
查看更多