没有端点监听(url)来接收消息

时间:2022-01-17 16:49:22

I'm building an ASP.NET website - it's a solution with a few projects, a data base and a web service. Everything worked fine, but last time I tried to run the project, I got the following error:

我建立一个ASP。它是一个解决方案,有几个项目,一个数据库和一个web服务。一切都很好,但上次我尝试运行这个项目时,我犯了以下错误:

There was no endpoint listening at http://localhost:[number]/BooksWS.svc that could accept the
message. This is often caused by an incorrect address or SOAP action. See InnerException, 
if present, for more details.

The inner exception says:

内部异常说:

Unable to connect to the remote server

This error sort of came out of the blue, so I'm not sure what additional information I should provide. Does anyone have any idea why this could happen?

这个错误是突然出现的,所以我不确定我应该提供什么额外的信息。有人知道为什么会这样吗?

I suppose even a general answer could help, the only info I found about this error in the web concerned WCF.

我想即使是一个一般的答案也会有帮助,我在web上找到的关于这个错误的唯一信息是关于WCF的。

8 个解决方案

#1


9  

go to webconfig page of your site, look for the tag endpoint, and check the port in the address attribute, maybe there was a change in the port number

转到站点的webconfig页面,查找标记端点,并检查address属性中的端口,可能端口号有变化

#2


7  

Another case I just had - when the request size is bigger than the request size set in IIS as a limit, then you can get that error too.

另一种情况是,当请求大小大于IIS中设置的请求大小作为限制时,您也可以得到这个错误。

Check the IIS request limit and increase it if it's lower than you need. Here is how you can check and change the IIS request limit:

检查IIS请求限制,如果低于需要,则增加它。以下是如何检查和更改IIS请求限制:

  1. Open the IIS
  2. 打开IIS
  3. Click your site and/or your mapped application
  4. 单击您的站点和/或映射应用程序
  5. Click on Feature view and click Request Filtering
  6. 点击功能视图,点击请求过滤。
  7. Click - Edit Feature Settings.
  8. 点击-编辑功能设置。

没有端点监听(url)来接收消息

I just found also another thread in stack IIS 7.5 hosted WCF service throws EndpointNotFoundException with 404 only for large requests

我还在堆栈IIS 7.5托管的WCF服务中发现了另一个线程,它将EndpointNotFoundException与404一起抛出,只针对大型请求

#3


2  

An another possible case is make sure that you have installed WCF Activation feature. Go to Server Manager > Features > Add Features

另一个可能的情况是确保已经安装了WCF激活特性。转到服务器管理器>功能>添加功能

没有端点监听(url)来接收消息

#4


1  

Short answer but did you have Skype open? This interferes specifically with ASP.NET by default (and localhosts in general) using port:80.

简短的回答,但是你有Skype吗?这就特别干扰了ASP。NET默认使用端口:80(通常是本地主机)。

In Windows: Go to Tools -> Options -> Advanced -> Connection and uncheck the box "use port 80 and 443 as alternatives for incoming connections".

在Windows中:转到Tools ->选项-> Advanced ->连接,取消选中“使用端口80和443作为传入连接的替代”框。

#5


1  

Try this:

试试这个:

  • Delete the service instance.
  • 删除服务实例。
  • Create a new instance of the service.
  • 创建服务的新实例。

Sometimes the port is changed and generated error.

有时,端口被更改并产生错误。

#6


1  

If you are using custom binding, please make sure that you are putting the same name for both custom binding (Server and Client)in config files

如果您正在使用自定义绑定,请确保在配置文件中为自定义绑定(服务器和客户端)输入相同的名称

<bindings>
<customBinding>
 <binding name="BufferedHttpServerNoAuth" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00">
          <gzipMessageEncoding innerMessageEncoding="textMessageEncoding" MaxArrayLength="10485760" MaxBytesPerRead="31457280" MaxStringContentLength="102400000" />
          <httpsTransport hostNameComparisonMode="StrongWildcard" manualAddressing="False" maxReceivedMessageSize="31457280" authenticationScheme="Anonymous" bypassProxyOnLocal="True" realm="" useDefaultWebProxy="False" />
</binding>
</customBinding>
</bindings>

the binding name "BufferedHttpServerNoAuth" should be same in both.

绑定名“BufferedHttpServerNoAuth”应该在这两者中都相同。

Hope this would help someone

希望这能对某人有所帮助

#7


0  

I had this problem when I was trying to call a WCF service hosted in a new server from a windows application from my local. I was getting same error message and at end had this "No connection could be made because the target machine actively refused it 127.0.0.1:8888". I donot know whether I am wrong or correct but I feel whenever the server was getting request from my windows application it is routing to something else. So I did some reading and added below in Web.config of service host project. After that everything worked like a magic.

当我试图从本地的windows应用程序调用托管在新服务器中的WCF服务时,我遇到了这个问题。我得到了相同的错误消息,最后出现了“无法连接,因为目标机器主动拒绝了它127.0.1:88”。我不知道我是错的还是对的,但我觉得每当服务器收到来自我windows应用程序的请求时,它就会路由到其他东西。所以我在网上做了一些阅读和补充。配置服务主机项目。从那以后,一切都像变魔术一样。

<system.net>
    <defaultProxy enabled="false">
    </defaultProxy>
</system.net>

#8


0  

I solved it by passing the binding with endpoint.
"http://abcd.net/SampleFileService.svc/basicHttpWSSecurity"

我通过将绑定传递给端点来解决这个问题。“http://abcd.net/SampleFileService.svc/basicHttpWSSecurity”

#1


9  

go to webconfig page of your site, look for the tag endpoint, and check the port in the address attribute, maybe there was a change in the port number

转到站点的webconfig页面,查找标记端点,并检查address属性中的端口,可能端口号有变化

#2


7  

Another case I just had - when the request size is bigger than the request size set in IIS as a limit, then you can get that error too.

另一种情况是,当请求大小大于IIS中设置的请求大小作为限制时,您也可以得到这个错误。

Check the IIS request limit and increase it if it's lower than you need. Here is how you can check and change the IIS request limit:

检查IIS请求限制,如果低于需要,则增加它。以下是如何检查和更改IIS请求限制:

  1. Open the IIS
  2. 打开IIS
  3. Click your site and/or your mapped application
  4. 单击您的站点和/或映射应用程序
  5. Click on Feature view and click Request Filtering
  6. 点击功能视图,点击请求过滤。
  7. Click - Edit Feature Settings.
  8. 点击-编辑功能设置。

没有端点监听(url)来接收消息

I just found also another thread in stack IIS 7.5 hosted WCF service throws EndpointNotFoundException with 404 only for large requests

我还在堆栈IIS 7.5托管的WCF服务中发现了另一个线程,它将EndpointNotFoundException与404一起抛出,只针对大型请求

#3


2  

An another possible case is make sure that you have installed WCF Activation feature. Go to Server Manager > Features > Add Features

另一个可能的情况是确保已经安装了WCF激活特性。转到服务器管理器>功能>添加功能

没有端点监听(url)来接收消息

#4


1  

Short answer but did you have Skype open? This interferes specifically with ASP.NET by default (and localhosts in general) using port:80.

简短的回答,但是你有Skype吗?这就特别干扰了ASP。NET默认使用端口:80(通常是本地主机)。

In Windows: Go to Tools -> Options -> Advanced -> Connection and uncheck the box "use port 80 and 443 as alternatives for incoming connections".

在Windows中:转到Tools ->选项-> Advanced ->连接,取消选中“使用端口80和443作为传入连接的替代”框。

#5


1  

Try this:

试试这个:

  • Delete the service instance.
  • 删除服务实例。
  • Create a new instance of the service.
  • 创建服务的新实例。

Sometimes the port is changed and generated error.

有时,端口被更改并产生错误。

#6


1  

If you are using custom binding, please make sure that you are putting the same name for both custom binding (Server and Client)in config files

如果您正在使用自定义绑定,请确保在配置文件中为自定义绑定(服务器和客户端)输入相同的名称

<bindings>
<customBinding>
 <binding name="BufferedHttpServerNoAuth" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00">
          <gzipMessageEncoding innerMessageEncoding="textMessageEncoding" MaxArrayLength="10485760" MaxBytesPerRead="31457280" MaxStringContentLength="102400000" />
          <httpsTransport hostNameComparisonMode="StrongWildcard" manualAddressing="False" maxReceivedMessageSize="31457280" authenticationScheme="Anonymous" bypassProxyOnLocal="True" realm="" useDefaultWebProxy="False" />
</binding>
</customBinding>
</bindings>

the binding name "BufferedHttpServerNoAuth" should be same in both.

绑定名“BufferedHttpServerNoAuth”应该在这两者中都相同。

Hope this would help someone

希望这能对某人有所帮助

#7


0  

I had this problem when I was trying to call a WCF service hosted in a new server from a windows application from my local. I was getting same error message and at end had this "No connection could be made because the target machine actively refused it 127.0.0.1:8888". I donot know whether I am wrong or correct but I feel whenever the server was getting request from my windows application it is routing to something else. So I did some reading and added below in Web.config of service host project. After that everything worked like a magic.

当我试图从本地的windows应用程序调用托管在新服务器中的WCF服务时,我遇到了这个问题。我得到了相同的错误消息,最后出现了“无法连接,因为目标机器主动拒绝了它127.0.1:88”。我不知道我是错的还是对的,但我觉得每当服务器收到来自我windows应用程序的请求时,它就会路由到其他东西。所以我在网上做了一些阅读和补充。配置服务主机项目。从那以后,一切都像变魔术一样。

<system.net>
    <defaultProxy enabled="false">
    </defaultProxy>
</system.net>

#8


0  

I solved it by passing the binding with endpoint.
"http://abcd.net/SampleFileService.svc/basicHttpWSSecurity"

我通过将绑定传递给端点来解决这个问题。“http://abcd.net/SampleFileService.svc/basicHttpWSSecurity”