Error when connecting to Web Service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • E11esar
    New Member
    • Nov 2008
    • 132

    Error when connecting to Web Service

    Hi everybody - hope we are all enjoying the Christmas countdown..?

    I am testing a client application written in C# / ASP.Net that subscribes to a web service.

    When I invoke one of the web methods from the client, I receive the following error message:

    "No connection could be made because the target machine actively refused it..."

    This is then followed by an IP address and Port number combination.

    If I run this in Visual Studio then all works okay.

    Any ideas as to what I may be doing wrong please?

    I have published both the client and web services and placed in their own respective virtual directories in IIS.

    Thank you.

    Mark :)
  • E11esar
    New Member
    • Nov 2008
    • 132

    #2
    Sorry just solved this one! Please ignore this.

    Thank you.

    Mark :)

    Comment

    • balabaster
      Recognized Expert Contributor
      • Mar 2007
      • 798

      #3
      Care to post the solution just to be helpful to others in future?

      Comment

      • E11esar
        New Member
        • Nov 2008
        • 132

        #4
        Solution

        Yup good idea.

        The reason my client application would not connect was I had copy/pasted in the wrong url to the web service when adding in the web reference. Might sound daft and simple but the resulting error was a major red herring.

        So hence once you do create the web service and have published it then placed it in a virtual directory in IIS, make sure that when the web service is fired up that you use that same URL that appears in the address bar in Internet Explorer in the web reference of a subscribing application, then all will work fine :)

        Thank you.

        Mark :)

        Comment

        • balabaster
          Recognized Expert Contributor
          • Mar 2007
          • 798

          #5
          Thanks Mark - appreciate it. There's nothing more frustrating than finding someone who had the same problem as you that said "oh, I fixed it" - but then doesn't elaborate.

          Comment

          Working...