调用WCF服务(C#)时发生异常
请帮助,我在尝试从ASP.NET web应用程序使用WCF服务时遇到以下异常:调用WCF服务(C#)时发生异常,c#,asp.net,wcf,C#,Asp.net,Wcf,请帮助,我在尝试从ASP.NET web应用程序使用WCF服务时遇到以下异常: System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +622 System.Net.HttpWebRequest.GetRequestStream() +320 System.ServiceModel.Channels.WebRequestHttpOutput.GetOutputStream() +115
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.
System.Net.HttpWebRequest.GetRequestStream(TransportContext和context)+622
System.Net.HttpWebRequest.GetRequestStream()+320
System.ServiceModel.Channel.WebRequestHttpOutput.GetOutputStream()+115
[EndpointNotFoundException:此时没有端点侦听https:////Autenticacion.svc 这可能会接受消息。这通常是由不正确的地址或SOAP操作引起的。有关更多详细信息,请参阅InnerException(如果存在)。]
System.Runtime.Remoting.proxy.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)+357
System.Runtime.Remoting.proxy.RealProxy.PrivateInvoke(MessageData&msgData,Int32类型)+979
System.Web.UI.WebControls.Button.OnClick(EventArgs e)+114
System.Web.UI.WebControl.Button.RaisePostBackEvent(String eventArgument)+149
System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)+2755```
WCF服务已启动,可与本地测试一起使用,但在应用程序中给出此错误。
Web.config文件中的url是正确的。
可能只是打字错误?我想https:////Autenticacion.svc
应该是../Authentication.svc
(请参阅auth中的h)实际url是“”,与配置文件中的url完全相同。出于隐私原因,我在帖子中添加了一个通用值。你能通过浏览器访问url吗?可能无法访问?是的,我可以通过浏览器访问该服务。好的,这样您就可以从您的计算机访问运行在服务器btbext02
上的服务。ASP.NET网站在哪里运行?在另一台服务器上?btbext02
也可以从该服务器访问吗?网站运行在谁的用户上下文中?可能不允许该用户访问btbext02
?