locked
SoapException: Server was unable to process request RRS feed

  • Question

  • Hi everybody,

    I'm trying to consume an asp.net web service(not WCF) and i get the next exception:

    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

    About the environment and implementation:

    The web service is hosted in IIS with integrated authentication activated and is consumed from a desktop application inside the same domain. Both, the web service and the client application are written under .net Framework 3.5. The web operation receives an entity(marked with serializable atribute) as parameter with the data for the operation, the members types are primarily strings (one of those is DateTime).

    I do not know about the index referred , I welcome any ideas about this.

    regards,

    Jhenao - MCP

    Thursday, March 4, 2010 5:14 PM

Answers

  • The exception you see is coming a format call (string.Format(), or StringBuilder.AppendFormat()).  Basically the caller of the Format() method  did not provide all needed parameters for all {N} placeholders.

    The calling code could  be in WebServices framework, or in the server-side WebMethod implementation, it is hard to tell without the stack.

    Try to review the WebMethod code for mismatch format  placeholders and provided substitutions.

    Thanks,
    Elena
    Thursday, March 4, 2010 6:47 PM
    Moderator

All replies

  • The exception you see is coming a format call (string.Format(), or StringBuilder.AppendFormat()).  Basically the caller of the Format() method  did not provide all needed parameters for all {N} placeholders.

    The calling code could  be in WebServices framework, or in the server-side WebMethod implementation, it is hard to tell without the stack.

    Try to review the WebMethod code for mismatch format  placeholders and provided substitutions.

    Thanks,
    Elena
    Thursday, March 4, 2010 6:47 PM
    Moderator
  • Hi Elena,

    The server side webmethod manages the exceptions(under a try..catch block), therefore if an exception occurs the client should not  to receive an soapexception(correct me if I'm wrong), this exception was thrown from the client while calling.

    regards,
    Thursday, March 4, 2010 7:35 PM
  • I've never seen an ASMX client call String.Format or StringBuilder.AppendFormat, or anything like that.

    I recommend you look at the service code and confirm that it "handles" all exceptions, and that it could not possibly be the cause.

    I also recommend  that you wrap your call to the web service in a try/catch block, then post here the results of ex.ToString() on the exception you catch.


    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Friday, March 5, 2010 2:14 AM
    Moderator
  • Hi Elena and John, I share you the result of the issue:
    The Exception handling code block of the web service operation was who was throwing this exception (this block uses String.Format to write in a technical log)  plop...
    Thank everyone for your friendly attentiveness
    Friday, March 5, 2010 8:14 PM
  • Nothing... probably how to disguise a hidden seo link better? The spammer's English is improving by the way. The sentences are longer now.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Sunday, January 30, 2011 7:01 PM