我有一个C#控制台应用程序,该应用程序从远程WCF服务获取数据。该应用程序可以在Visual Studio中正常运行,也可以双击C#Release Bin文件夹中的application.exe文件。两种情况都运行良好。
但是,当我尝试通过Windows Scheduler计划运行时,出现此错误
无法解析远程名称:在System.Net.HttpWebRequest.GetRequestStream()的System.Net.HttpWebRequest.GetRequestStream()处,在System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()处
知道为什么双击控制台application.exe可以正常工作,但不能使用Windows Scheduler运行它。该错误表明我通过Windows Scheduler运行时无法解析服务地址。
完整堆栈跟踪:
System.ServiceModel.EndpointNotFoundException:在https://abc.defg.com:444/somedata.svc上没有侦听终结点的端点可以接受该消息。这通常是由不正确的地址或SOAP操作引起的。有关更多详细信息,请参见InnerException(如果存在)。---> System.Net.WebException:无法解析远程名称:System.Net.HttpWebRequest.GetRequestStream()处System.Net.HttpWebRequest.GetRequestStream(TransportContext&context)处的'abc.defg.com'。 ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()-内部异常堆栈跟踪的结尾-
服务器堆栈跟踪:位于System.ServiceModel.Channels.HttpOutput.Send处的System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()(TimeSpan超时)
位于System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message,TimeSpan timeout)处于System.ServiceModel.Channels.RequestChannel.Request(Message,TimeSpan timeout)处于System.ServiceModel.Dispatcher.RequestChannelBinder.Request (消息消息,TimeSpan超时)在System.ServiceModel.Channels.ServiceChannelProxy.InvokeService处(字符串操作,布尔型单向,ProxyOperationRuntime操作,Object [] ins,Object []超时,TimeSpan超时) (IMethodCallMessage methodCall,ProxyOperationRuntime操作)在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)
这是一个Intranet防火墙问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句