error in deserializing body of reply message

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • William LaMartin

    error in deserializing body of reply message

    I have created a web service that simply uses WebClient to retrieve the text
    of a web page. If I access the asmx page with my browser and put in a URL,
    it retrieves the text of that page with no problem--no matter how large the
    page length.

    When I try to consume this service in a VB.net desktop application,
    everything is fine for a page with a small amount of text. However, if the
    page has just a moderate amount of text, I receive the error message: "error
    in deserializing body of reply message".

    The code is below. I have tried changing the bind property,
    bind.MaxReceive dMessageSize, to no avail.

    Has anyone run into this problem? All of this was done in Visual Studio
    2008.



    Try
    Dim bind As New ServiceModel.Ba sicHttpBinding
    Dim endpoint As New ServiceModel.En dpointAddress(" The service
    URL")
    Dim ws As New GetWebPageServi ce.Service1Soap Client(bind,
    endpoint)
    ws.Open()

    Me.txtResult.Te xt = ws.GetPage(Me.t xtURL.Text).ToS tring

    Catch ex As Exception
    MsgBox("Error: " & ex.Message)
    End Try


Working...