【问题标题】:WebService cannot communicate with another WS via IIS but it can via VisualStudioWebService 无法通过 IIS 与另一个 WS 通信,但可以通过 VisualStudio
【发布时间】:2016-06-25 10:39:56
【问题描述】:

首先欢迎,因为这是我的第一篇文章。 我开发了连接到其他两个 WebServices 的 WebService (.NET 4.0)。这两个之一是外部的,第二个是内部的,但位于另一台服务器上。

在 Visual Studio 中进行开发时,沟通非常完美,一切都很好——我的 WS 与其他两个。但是当我将我的 WS 移动到服务器上的 IIS 时,我收到了问题:

There was no endpoint listening at <<<url>>> that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

在内部异常中,我有(对不起德语;]):

Server stack trace: 
   bei System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
   bei System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
   bei System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
   bei System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   bei MessagingAgent.eCallWS.eCallSoap.SendSMSBasic(SendSMSBasicRequest request)
   bei MessagingAgent.eCallWS.eCallSoapClient.MessagingAgent.eCallWS.eCallSoap.SendSMSBasic(SendSMSBasicRequest request) in C:\_projects\MessagingAgent\Service References\eCallWS\Reference.cs:Zeile 888.
   bei MessagingAgent.eCallWS.eCallSoapClient.SendSMSBasic(String AccountName, String AccountPassword, String Address, String Message, String JobID, String SMSCallback, String Notification, String Answer, String SendDate, String MsgType, String NoLog, String AlwaysNotification) in C:\_projects\MessagingAgent\Service References\eCallWS\Reference.cs:Zeile 906.
   bei MessagingAgent.SmsSender.SendSmsBasic(String address, String message, String jobId) in C:\_projects\MessagingAgent\SMS\SmsSender.cs:Zeile 46.
   bei MessagingAgent.Service1.SendSMSWithJob(String telNo, String content, String jobID) in C:\_projects\MessagingAgent\SMSProvider.asmx.cs:Zeile 48.

为了传递更多信息 - WS 托管在 IIS 6.1 上。我为此创建了新的 ApplicationPool

你能帮我吗?

【问题讨论】:

    标签: asp.net .net web-services visual-studio-2010 iis


    【解决方案1】:

    我的问题是我们公司网络上的代理服务器。我必须在我的 web.config 中明确说明它,它运行良好。

    这是我添加到 web.config 中的内容:

     <system.net>
    <defaultProxy>
          <proxy
            proxyaddress="http://webproxy.mycompany.com:8080"
            bypassonlocal="true"
          />
    </defaultProxy>
    </system.net>
    

    让我感到困惑的是,如果没有上述声明,它在由 Visual Studio 开发服务器托管但不在 IIS 上时工作正常。没关系 - 我现在可以工作了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-02-23
      • 2015-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-19
      • 1970-01-01
      相关资源
      最近更新 更多