[英]Remote server returned 404
Code 码
Web.config Web.config文件
<endpoint address="https://localhost/webapi/ProductData.svc/Secured"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IProductData"
contract="Client.IProductData" name="BasicHttpBinding_IProductDataSecured" />
<endpoint address="https://fow01003.fbce.local/webapi/ProductData.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IProductData1"
contract="Client.IProductData" name="BasicHttpBinding_IProductData" />
Controller 调节器
client = new ProductDataClient("BasicHttpBinding_IProductData"); //This Works
client.Test(); // This fails
Error messages 错误消息
Exception : There was no endpoint listening at https://fow01003.fbce.local/webapi/ProductData.svc that could accept the message. 例外 :在https://fow01003.fbce.local/webapi/ProductData.svc上没有可以接受该消息的端点监听。 This is often caused by an incorrect address or SOAP action. 这通常是由错误的地址或SOAP操作引起的。 See InnerException, if present, for more details. 有关更多详细信息,请参阅InnerException(如果存在)。
InnerException : "The remote server returned an error: (404) Not Found." InnerException :“远程服务器返回错误:(404)Not Found。”
Problem 问题
As shown above, theres'no endpoint listening. 如上所示,theres'没有端点监听。 However, when I go to https://fow01003.fbce.local/webapi/ProductData.svc it shows me that the service is running and I can check the wsdl which holds all information it should. 但是,当我转到https://fow01003.fbce.local/webapi/ProductData.svc时,它告诉我服务正在运行,我可以检查wsdl,它包含它应该包含的所有信息。
(PS. FOW01003.fbce.local = localhost). (PS.FOW01003.fbce.local = localhost)。
What steps can I take to find what really is going wrong? 我可以采取哪些步骤来找出真正的问题?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.