Form Postback Error - KeyNotFoundException - InfoPath Dev
in

InfoPath Dev

Form Postback Error - KeyNotFoundException

Last post 07-27-2013 10:46 PM by Patrick Halstead. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-15-2013 05:09 PM

    • bb123
    • Not Ranked
    • Joined on 01-16-2013
    • Posts 1

    Form Postback Error - KeyNotFoundException

    I have a Administrator approved browser enabled form, and on my submit button I call a webservice to insert some data. Everything works fine in InfoPath 2010 filler, but now all of a sudden I am getting this error when trying to submit my form:

    There was a form postback error. ( Type: KeyNotFoundException, Exception Message: The given key was not present in the dictionary.)

    Can anyone point me to the right direction of where I should be even looking for here ? I have another simple button on the screen to call a webservice to insert some data, and have other webservices to retrieve data on the form which all work fine, so I do not believe this is a permissions error at all. I have some simple logic on some of the dropdown boxes on my forms, when dropdown Priority= "High", enable dropdown B box, etc .. All of these appear to be working fine, so I'm just not sure which type of Postback it could be complaining about ? Or which key and dictionary it is complaining about ?

    Any help would be much appreciated.
  • 01-17-2013 03:19 PM In reply to

    Re: Form Postback Error - KeyNotFoundException

    Check your SharePoint log files and see if you can get more info from there.

    Default locations:
    SharePoint 2007 - C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS
    SharePoint 2010 - C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS

    Hilary Stoupa

  • 07-22-2013 11:01 PM In reply to

    Re: Form Postback Error - KeyNotFoundException

     Hi Hilary

     I am having the same issue. I am working on a sample InfoPath form found here: http://www.bizsupportonline.net/infopath2007/calculate-date-difference-infopath-rules-excel-services.htm

    The form works fine in InfoPath Filler but not in the browser. My form, which is a Leave form, does have a few more fields which are textboxes and 2 people picker controls. I also have 2 buttons on the form, one to get the days between two dates and one to submit the form to the form library. I get the error when I hit the button that contact Excel services to get the days between 2 dates.

    My log files on WFE say this:

     07/23/2013 14:10:39.54     w3wp.exe (0x0C10)                           0x02F8    InfoPath Forms Services           Runtime - Business Logic          82g1    Critical    There was a form postback error. (User: domain\user01, Form Name: LeaveForm, IP: , Request: http://portal/_layouts/FormServer.aspx?XsnLocation=http://portal/FormServerTemplates/LeaveForm.xsn&SaveLocation=http://portal/Leave Form&ClientInstalled=true&Source=http://portal/Leave%2520Form/Forms/AllItems.aspx&DefaultItemOpen=1, Form ID: urn:schemas-microsoft-com:office:infopath:LeaveForm:-myXSD-2013-07-18T23-06-48, Type: KeyNotFoundException, Exception Message: The given key was not present in the dictionary.)    4f391534-b1d1-49fb-a001-c08e2a8252a4
    07/23/2013 14:10:39.54     w3wp.exe (0x0C10)                           0x02F8    InfoPath Forms Services           Runtime                           8geb    Exception    Unhandled exception when rendering form on postback System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.     at System.ThrowHelper.ThrowKeyNotFoundException()     at System.Collections.Generic.Dictionary`2.get_Item(TKey key)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DatabaseHelper.GetSchemaXml(String namespaceUri, Solution solution, String dataObjectName, SchemaNavigator& schema, XPathNavigator& originalSchema, XmlNamespaceManager& namespaceManager)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.PartFragmentHelper.IsDataSetNode(Solution solution, XPathNavigator node)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.PartFragmentHelper.ApplyPartFragmentGather(DataAdapter adapter, XPathNavigator sourceDOM, DataObjec...    4f391534-b1d1-49fb-a001-c08e2a8252a4
    07/23/2013 14:10:39.54*    w3wp.exe (0x0C10)                           0x02F8    InfoPath Forms Services           Runtime                           8geb    Exception    ...ts dataObjects, XPathNavigator targetDOM, PartFragment[] partFragments, Boolean[]& areDataSets)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterWebServiceSubmit.Execute(Document document, Uri soapAction, Uri serviceUrl, XPathNavigator querySubDOM, XPathNavigator resultsSubDOM, XPathNavigator errorsSubDOM, Int64 timeout, DataAdapterCredentials credentials, Boolean useDcl, Boolean useProxy, Boolean useSelf)     at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapterWebServiceSubmit.ExecuteInternal(XPathNavigator queryFields, XPathNavigator resultFields, XPathNavigator errors)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.RuleAction.EvaluateExpression(Document document, XPathNavigator currentTarget)     at Microsoft.Office.InfoPath.Server.SolutionLifeti...    4f391534-b1d1-49fb-a001-c08e2a8252a4
    07/23/2013 14:10:39.54*    w3wp.exe (0x0C10)                           0x02F8    InfoPath Forms Services           Runtime                           8geb    Exception    ...me.RulesRuleSet.EvaluateExpression(Document document, XPathNavigator targetNavigator)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.ButtonFormCode.Click(Document document, XPathNavigator container)     at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventClick.Play(Document document, BindingServices bindingServices, EventLogProcessor eventLogProcessor)     at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventLogProcessor.ExecuteLog(Int32 expectedEventLogID)     at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.<>c__DisplayClass13.<PlayEventLog>b__11()     at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)    4f391534-b1d1-49fb-a001-c08e2a8252a4
    07/23/2013 14:10:39.54     w3wp.exe (0x0C10)                           0x02F8    SharePoint Server                 Unified Logging Service           c91s    Monitorable    Watson bucket parameters: SharePoint Server 2010, ULSException14, 41b7c39f "infopath forms services", 0e00178d "14.0.6029.0", c180aef3 "mscorlib", 0200c627 "2.0.50727.0", 5174de33 "mon apr 22 16:52:35 2013", 000000dd "000000dd", 00000005 "00000005", 0560164b "keynotfoundexception", 38676562 "8geb"    4f391534-b1d1-49fb-a001-c08e2a8252a4
    07/23/2013 14:10:39.74     OWSTIMER.EXE (0x0A44)                       0x0AA4    Web Content Management            Site Management                   c07h    High        SpawnVariationSitesJob has started    14a9a01e-116a-44a0-874b-6fdc0d53f800

     

    Event Viewer on WFE reports this:

    There was a form postback error. (User: domain\user01, Form Name: LeaveForm, IP: , Request: http://portal/_layouts/FormServer.aspx?XsnLocation=http://portal/FormServerTemplates/LeaveForm.xsn&SaveLocation=http://portal/Leave Form&ClientInstalled=true&Source=http://portal/Leave%2520Form/Forms/AllItems.aspx&DefaultItemOpen=1, Form ID: urn:schemas-microsoft-com:office:infopath:LeaveForm:-myXSD-2013-07-18T23-06-48, Type: KeyNotFoundException, Exception Message: The given key was not present in the dictionary.)

     

    Thanks

    Yoshi

  • 07-23-2013 11:13 PM In reply to

    Re: Form Postback Error - KeyNotFoundException

    Please ask S.Y.M. Wongaton about her sample. We can't be expected to debug other people's stuff. 

    Patrick Halstead
    Project Manager at Qdabra
  • 07-24-2013 03:09 PM In reply to

    Re: Form Postback Error - KeyNotFoundException

    Patrick, thanks for your response. I wasn't expecting you or anyone on here to "debug" my log file. I thought given that this is a Forum for InfoPath, someone might have a clue as to what was going on with the error in the log file. If you read the original query at the top of the page you would have noticed it has to do with the same error but there was no solution provided.

    Yoshi

  • 07-27-2013 10:46 PM In reply to

    Re: Form Postback Error - KeyNotFoundException

    Hi Yoshi,

    Sorry for assuming that you were "free-loading" and asking us to answer a post by one of the competing web sites.

    We get a lot of people who do ask us to debug Sancia's stuff (S.Y.M. Wongaton) and we have grown wary of it especially since she doesn't do best practice stuff (i.e. she recommends code too much when it isn't required) and she doesn't answer posts on her web site and I think she should given how popular her site is. Anyway. that was what I thought you were doing. Sorry I mis-represented you.

    So, you are asking about he specific error which is the same as the original post.

    We have done thousands of InfoPath form solutions and we have never seen this KeyNotFoundException error.  So, I Googled it and here are two relevant links ...

    http://social.technet.microsoft.com/Forums/en-US/32bc3e99-c54b-4b31-823e-d7d57219bf2a/getting-error-while-submitting-data-to-excel-workbook-through-excel-services-in-infopath-2010

    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/5d1d71a7-e700-449e-9024-edb0f5a30dbc/form-postback-error-keynotfoundexception

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.