Problem with XML Services

  • 19 years ago

    Hi, I hope someone out there can help me!


    I am trying to develop an XML web service, and a client application that uses the service, both using VB.Net.


    I am using the example given in the Visual Studio .Net documentation - a Temperature Conversion service.


    I have successfully built the service and can test it ok using the default test pages that IIS provides.


    I then build the client to use this service. I have not renamed the service, instead just using the "localHost" label that is given by default.


    Basic operation seems to be successful. In a browser on any machine in the network I get the page with the input box, button and label as instructed. I have added some extra code to the button1click function as below:

    Code:

    Private Sub Button1
    Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
           Dim ws As New localhost.Service1()
           Dim dFahrenheit As Double
           Dim dCelsius As Double
           If TextBox1.Text.Length > 0 Then
               On Error GoTo ConvertError
               dFahrenheit = Convert.ToDouble(TextBox1.Text)
               dCelsius = ws.ConvertTemperature(dFahrenheit)
           Else
               dCelsius = 0
           End If
           Label1.Text = dCelsius.ToString()
           Exit Sub
    ConvertError:
           Label1.Text = Err.Description
       End Sub

    This code allows me to submit the form with no input (lenght of text1 is zero), and I get the value 0 returned in the label, as expected.


    BUT...


    When I enter a value in text1 and submit the form, the code runs as far as:

    Code:

               dCelsius = ws.ConvertTemperature(dFahrenheit)

    then it hangs. The whole of the IIS hangs for about 90 seconds. I cannot get any pages from the IIS at all, from any machine, it just goes dead. After the 90 secs or so is up, a timeout error is raised, and label1 contains the message "Operation timed out". IIS comes back to life.


    I have tried setting both the service1 and service1client entries in IIS to run as isolated processes, but this makes no difference. IIS still hangs for 90 secs then comes back to life.


    Does anyone know what I need to do to fix this problem?


    Thanks in advance!

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Owning a computer without programming is like having a kitchen and using only the microwave oven” - Charles Petzold