简体   繁体   English

调用 WCF web 服务但仅由我的 Windows 服务时出现 503 错误

[英]503 Error when calling WCF web service but only by my Windows Service

I have a WCF service that I wrote and is working fine in a production environment.我有一个我编写的 WCF 服务,并且在生产环境中运行良好。 However I am getting an error is a new test environment.但是我得到一个错误是一个新的测试环境。

The service is being accessed by a Windows service running on the same server.运行在同一台服务器上的 Windows 服务正在访问该服务。 When it attempts to send a request it receives a 503 response code with a message saying the service is unavailable.当它尝试发送请求时,它会收到一个 503 响应代码,其中包含一条表明服务不可用的消息。

However I have confirmed that the service is reachable by browsing to the auto-generated service information page and the WDSL.但是,我已经确认可以通过浏览自动生成的服务信息页面和 WDSL 来访问该服务。 I can also send requests to it using SOAPUI.我还可以使用 SOAPUI 向它发送请求。

All three clients (the app, the browser, and SOAPUI) are using the same base URL and all running locally on the same server.所有三个客户端(应用程序、浏览器和 SOAPUI)都使用相同的基础 URL 并且都在同一服务器上本地运行。

I don't understand how the service can be unavailable to one client but be available to the others.我不明白该服务如何对一个客户不可用,但对其他客户可用。

Both the web service and client (windows service) are written in c# in Visual Studio 2017 targeting.Net Framework 4.0 and running on a Win server 2016. web 服务和客户端(windows 服务)都是在 Visual Studio 2017 中的 c# 中编写的,目标是.Net Framework 4.0,并在 Win server 2016 上运行。

--Jacob ——雅各布

Any 5XX ranges are generated on the server side, which may mean that you have a configuration problem when deploying the server.任何 5XX 范围都是在服务器端生成的,这可能意味着您在部署服务器时遇到了配置问题。
If it works fine on your development machine, then pay close attention to setting anything like the IP address or other communication port that will be used.如果它在您的开发机器上运行良好,那么请密切注意设置诸如 IP 地址或将使用的其他通信端口之类的任何内容。
You can check the documentation on the 503 Service Unavailable error: what it is and how to fix it.您可以查看有关 503 Service Unavailable 错误的文档:它是什么以及如何修复它。

https://www.ionos.com/digitalguide/hosting/technical-matters/http-503-how-to-fix-website-errors/ https://www.ionos.com/digitalguide/hosting/technical-matters/http-503-how-to-fix-website-errors/
https://airbrake.io/blog/http-errors/503-service-unavailablehttps://airbrake.io/blog/http-errors/503-service-unavailable
Service Unavailable 503 + The HTTP service located at http://localhost/ProductsService/Service.svc is too busy 服务不可用 503 + 位于 http://localhost/ProductsService/Service.svc 的 HTTP 服务太忙

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM