微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

异常调用 WCF 服务 (C#)

如何解决异常调用 WCF 服务 (C#)

请帮忙,当我尝试从 ASP.NET Web 应用程序使用 WCF 服务时遇到以下异常:

   System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +622
   System.Net.HttpWebRequest.GetRequestStream() +320
   System.ServiceModel.Channels.WebRequestHttpOutput.GetoutputStream() +115

[EndpointNotFoundException: There was no endpoint listening at https://<serverName>/<serviceName>/Autenticacion.svc that Could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException,if present,for more details.]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) +357
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type) +979
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +114
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +149
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterasyncPoint) +2755```

The WCF service is up and it works with local tests,but give this error in the application.
The url is correct in the Web.config file.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。