CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Posts
    5

    InvalidOperationException

    Hi,

    We are using VB.net for developing the windown application. Using webservices for updating and fetching the data to the server. It works fine as we are using this setup for quite some time. Now we are in to one big form where i need to take 50 inputs. with this the webservices raises a exception which i put down. can anyone faced the same problem and can suggest soemthing. Webservice works fine for all the input forms except this big one.

    Thanks in advance

    --- exception
    ?ex
    {System.InvalidOperationException}
    [System.InvalidOperationException]: {System.InvalidOperationException}
    HelpLink: Nothing
    InnerException: {System.ArgumentException}
    Message: "There was an error generating the XML document."
    Source: "System.Xml"
    StackTrace: " at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle)
    at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage message)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    at NIC.RDS.WSProxyCommon.WS_UpdateService.InsertServiceTransaction(DataSet dsKioskData) in C:\RDS\Code\RDSKiosk\WSProxyCommon\WS_UpdateService.vb:line 42
    at NIC.RDS.UICommonTemplates.frmBaseEntry.butSave_Click(Object sender, EventArgs e) in C:\RDS\Code\RDSKiosk\UICommonTemplates\frmBaseEntry.vb:line 1512"
    TargetSite: {System.Reflection.RuntimeMethodInfo}


    regards
    krishna

  2. #2
    Andy Tacker is offline More than "Just Another Member"
    Join Date
    Jun 2001
    Location
    55°50' N 37°39' E
    Posts
    1,503

    Re: InvalidOperationException

    One rough Guess... it's related with your table in database... when you are using your dataset. some values are not matching... take a good look...
    If you think you CAN, you can, If you think you CAN'T, you are probably right.

    Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.

  3. #3
    Join Date
    Jan 2005
    Posts
    70

    Re: InvalidOperationException

    I have seen this exception with webservices if there are any characters in the outgoing XML message that are in the extended ASCII region(127+) when sending char data.

  4. #4
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: InvalidOperationException

    Also various characters below 127 must be "escaped"...
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  5. #5
    Join Date
    Feb 2005
    Posts
    5

    Re: InvalidOperationException

    Hi Andy,

    Nice guess!! it worked. There was problme with my dataset and table. but exception raised miss leading.

    anyway thanks.

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

Featured