error in deserializing body of reply message

W

William LaMartin

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.MaxReceivedMessageSize, to no avail.

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



Try
Dim bind As New ServiceModel.BasicHttpBinding
Dim endpoint As New ServiceModel.EndpointAddress("The service
URL")
Dim ws As New GetWebPageService.Service1SoapClient(bind,
endpoint)
ws.Open()

Me.txtResult.Text = ws.GetPage(Me.txtURL.Text).ToString

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top