Results 1 to 3 of 3

Thread: [RESOLVED] vb.Net Web Service causing error in deserializing body of reply message for operation

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2008
    Posts
    98

    Resolved [RESOLVED] vb.Net Web Service causing error in deserializing body of reply message for operation

    Hi,

    I have a web service created in vb.net, and in the same project as my client app, also in vb.net. It has a vast number of 'WebMethods' that return/pass/update an SQL Server using datasets.

    All has been working great until I added more 'WebMethods', and all of a sudden I get the error 'error in deserializing body of reply message for operation' when calling previously working 'WebMethods' from the client app. If i remove the added 'WebMethods', then the errors disapear. I am 100% sure that the are no issues with my newly added 'WebMethods' as I have tried direct from the web service within a browser.

    It seems as though its a size limitation of the web service, as if a replace an existing 'WebMethod' that works from the client interface, with the new 'WebMethod', then it still works.

    Any ideas? Been struggling with this for a few days now.

    Here is an example of my 'WebMethod'

    Code:
    <WebMethod()> _
       Public Function Sel_CommunicationTypes(ByVal intCommunicationTypeID As Integer) As DataSet
    
            Dim strSelect As String
    
            strSelect = "Exec Sel_CommunicationTypes " & intCommunicationTypeID
    
            Dim adapter As New SqlDataAdapter(strSelect, connection)
            Dim dsCommunicationTypes As New DataSet
    
            adapter.Fill(dsCommunicationTypes, "CommunicationType")
    
            Return dsCommunicationTypes
    
        End Function

  2. #2
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,623

    Re: vb.Net Web Service causing error in deserializing body of reply message for opera

    I am assuming you are using Json (because you don't tell us) if so try adding this to you web config -

    Code:
    <system.web.extensions>
      <scripting>
        <webServices>
           <jsonSerialization maxJsonLength="5000000" />
        </webServices>
      </scripting> </system.web.extensions>
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2008
    Posts
    98

    Re: vb.Net Web Service causing error in deserializing body of reply message for opera

    Hi,

    Thanks, no it was SOAP. Anyway, it turns out it was the maxBufferSize. I increased this in the app.config file, and all works great now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width