locked
How to add the cloud deployed Webservice references to the automation solution RRS feed

  • Question

  • Hi,

    I am getting the below an error when i am trying to add the cloud WCF web service urls to my automation solution.

    "There was an error downloading '<URL> '.
    Unable to connect to the remote server
    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 IP<>

    Metadata contains a reference that cannot be resolved: ' <URL>'.
    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.
    Unable to connect to the remote server
    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 <IP>

    If the service is defined in the current solution, try building the solution and adding the service reference again."

    I can able to browse that service URL in the IE successfully,

    but i could not able to add it in the VS automation solution.

    Any help on this is appreciated.

    Thanks in advance

    Regards,

    G.Chaitanya

    Tuesday, June 12, 2012 1:23 PM

All replies

  • HI Chaitanya

    Fundamentally there is no difference while adding a service from cloud and local , some question and some step by step diagnostics below 

    First of all is it a WCF Web Service or WCF Data Service ? Assuming that It is WCF Data Service below  and Internet based 

    If you are behind the proxy then it is quite possible that Add Service Reference is not able to resolve the proxy In order to confirm above Try Downloading service.svc/$metadata. If it failed then it is something related to Proxy 

    you can try creating service reference class by using datasvcutil.exe  that will provide more detailed error information if fails , internally VS also uses the same. 

    You can use WireShark to intercept your network traffice that can tell what exactly happens when you wad trying to add reference 

    Also Instead  discussion thread Please consider changing type to question because it is not an open ended discussion 

    Regards

    Ashwini

     


    • Edited by Ashwini47 Tuesday, June 12, 2012 5:23 PM
    Tuesday, June 12, 2012 5:20 PM
  • Hi Ashwin

    Thanks for your reply,

    It is a WCF Webservice which i am trying to add, previously the whole setup is deployed on a server where i can able to add those webservice references to my automation solution by using add Service Reference option. But now this entire setup was moved to cloud environment when i am finding difficult to do the same.

    When i am trying to add the cloud webservice references to the project as add service reference it is throwing the above mentioned error.

    Not understanding what exactly i need to do with it.

    Regards,

    G.chaitanya

    Wednesday, June 13, 2012 10:33 AM
  • Hi

    Please let me know if any solution works for this problem.

    Regards,

    Chaitanya

    Thursday, June 14, 2012 9:05 AM
  • Hi Apology for delayed reply 

    For me it seem to be network problem only , 

    Possibilities are 

    1. Server is expecting explicit certificate (IE include by Default) 
    2. Or may be your credential is not being accepted 

    Please try following to narrow down the problem 

    Write a code to download the metadata and let me know if you are able to download , if not then send complete stack track of system 

    If you are not able to download metadata using code then there is some problem with network 

    HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(url);
              
     WebReq.UseDefaultCredentials = true;
     WebReq.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0)";
                
    foreach (X509Certificate cert in CertificateHalper.GetClientCertificates())
    {
        WebReq.ClientCertificates.Add(cert);
    }
     webResp = (HttpWebResponse)WebReq.GetResponse();
     StreamReader sr = new StreamReader(webResp.GetResponseStream());
                   
    string  resp = sr.ReadToEnd();
    

    Ashwini

    Friday, June 15, 2012 4:28 AM
  • Hi,

    Please find the attached trace information

    System.Net.WebException was unhandled
      Message=Unable to connect to the remote server
      Source=System
      StackTrace:
           at System.Net.HttpWebRequest.GetResponse()
           at ConsoleApplication1.Program.Main(String[] args) in D:\GDS Count Work\ConsoleApplication1\ConsoleApplication1\Program.cs:line 25
           at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: System.Net.Sockets.SocketException
           Message=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 157.56.30.224:443
           Source=System
           ErrorCode=10060
           NativeErrorCode=10060
           StackTrace:
                at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
                at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

    Please let me know if any more information is needed.

    Thanks

    Chaitanya

    Friday, June 15, 2012 1:29 PM
  • Hi Chaitanya

    Stack trace indicate that you have network problem, port 443 is HTTPs port and for me it look like your firewall settings are blocking the call (as indicated by stack trace your call never reached to remote server otherwise there would have been different error code than 10060)

    As you said that you are able to access via IE so that is expected because IE is usually excluded in firewall settings 

    Try turning off you firewall and try again , alternatively you can try configuring you firewall to include exclusion for Svcutil.exe/datasvcutil.exeand DevEnv.exe

    Regards

    Ashwini

    Saturday, June 16, 2012 12:55 PM
  • Hi Ashwin

    I tried adding the firewall execption for visual studio 2010 and also for Svcutil in windows firewall and tried to add the service reference still i am facing the same problem and i can able to see the same error.

    Also even i tried to add the service reference after turning off the Windows Firewall then also i am seeing the same error.

    Please suggest me.

    Regards,

    G.Chaitanya


    Monday, June 18, 2012 7:08 AM
  • If you are not able to do an HTTPGET on metadata url even after turning firewall off then there is some problem with your network and proxy , 

    Please ask someone from network team to check if you request is actually  reaching to remote host , I doubt that may be organisational firewall is causing this problem 


    Tuesday, June 19, 2012 10:59 AM