现在有一个coldfusion语言编写的webservice,
在本地用vs2010通过Add web reference可以访问,也能返回数据.
当把webservice地址换成客户qa的webservice地址,通过add web reference的方法添加时就会弹出一个security warning窗口。
同时运行程序时会返回下面的错误:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 40.255.0.206:22311Source Error: 
Line 47:         [return: System.Xml.Serialization.SoapElementAttribute("orderqueryReturn")]
Line 48:         public QueryBean orderquery(object contactID) {
Line 49:             object[] results = this.Invoke("orderquery", new object[] {
Line 50:                         contactID});
Line 51:             return ((QueryBean)(results[0]));
 Source File: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website3\b454f555\36d009f3\App_WebReferences.n2mvahth.2.cs    Line: 49 Stack Trace: 
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 40.255.0.206:22311]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +251
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +279[WebException: Unable to connect to the remote server]
   System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +6098117
   System.Net.HttpWebRequest.GetRequestStream() +13
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +110
   WS1.GetinfofororderService.orderquery(Object contactID) in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website3\b454f555\36d009f3\App_WebReferences.n2mvahth.2.cs:49
   _Default.Button1_Click(Object sender, EventArgs e) in c:\Documents and Settings\r12433\My Documents\Visual Studio 2010\WebSites\WebSite3\Default.aspx.cs:29
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
而通过url?wsdl方式访问还可以看到内容,不知道是什么原因?小弟是纯菜鸟,不知道有没有把问题说明白,希望有看懂问题的大侠可以解答
 

解决方案 »

  1.   

    当把webservice地址换成客户qa的webservice地址 
    你确认换了之后,那个地址是正确可用的?
      

  2.   

    应该好用,webservice是以前就在被coldfusion程序使用,只不过最近需要被c#程序调用,最开始用qa的webservice,弹出来证书不正确什么的,考虑到可能跟域,防火墙有关系,所以又换了prd上的webservice地址,虽然没有证书的问题了,不过还是报这个错误
      

  3.   

    偶,webservice在客户服务器上,在我本地调用报这个错误
      

  4.   

    什么叫 “当把webservice地址换成客户qa的webservice地址”,你是重新又发布了一个webService吗
      

  5.   

    qa,prd上都有这个webservice,我想qa可能只有客户的内网才能访问,所以用prd上的webservice测试。
    “开启远程”不知道是什么东西。。”关防火墙“:需要关吗?客户肯定不能愿意关啊。
      

  6.   

    一般访问webservice都需要关防火墙吗?小弟真心不清楚。