Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
调用WCF服务(C#)时发生异常_C#_Asp.net_Wcf - Fatal编程技术网

调用WCF服务(C#)时发生异常

调用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

请帮助,我在尝试从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.
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