Infopath - C# - Catastrophic failure - InfoPath Dev
in

InfoPath Dev

Infopath - C# - Catastrophic failure

Last post 06-03-2006 02:49 AM by kumar. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-30-2006 11:14 PM

    • kumar
    • Not Ranked
    • Joined on 05-30-2006
    • Posts 3

    Infopath - C# - Catastrophic failure

    Hello All,

    I need to open two .xsn templates in Infopath, the first one opens up fine and when i try to open the second one; it throws up the 'catastrophic failure' error and crashes.

    When we made the 'name' value (in PI) to null(we are doing it from theC# code, just before opening the template), both the templates opened fine. the problem was solved. But, what is right way to handle this?

    coz, we now have a new problem. We open two templates to do some copy-pasting from one form to the other. Now, we are able to open both the forms, but only the form that is opened first is functional. For example, we have custom toolbar on the forms which has a close button.

    The close button on the second form does not work, and close button on the first form closes both the forms with some error again.
    (We can do the copy-pasting though).

    Any suggestion at all would be appreciated.

    Thanks,
    Kumar
  • 05-31-2006 11:59 AM In reply to

    Re: Infopath - C# - Catastrophic failure

    Hi Kumar,
    Welcome to InfoPathDev forums!

    Do both the forms have same value in the "Name" field? Probably if the name value is then you might get this error. Can you try out one thing, instead of making the name value to null can you change the text in it and try out if that worksout.

    Which function are you using to open the second template file? Can you copy paste that code snippet here?
  • 06-01-2006 12:18 AM In reply to

    • kumar
    • Not Ranked
    • Joined on 05-30-2006
    • Posts 3

    Re: Infopath - C# - Catastrophic failure

    Hi Agni,

    Thanks for the reply. We are encountering following behavior:

    Scenario 1: Default behavior of Infopath
    i.e. "without making the 'name' in PI to null"

    a) say, we opened doc1.xsn successfully.
    If we open doc1.xsn again(second instance), Infopath fails to open the second instance with error message "Catastrophic failure". thats probably because the 'name' in PI is same for both of 'em.

    b) say, we opened doc1.xsn successfully.
    If we open some other document doc2.xsn(second instance), Infopath opens without any errors. We checked the 'name' in PI. It was obviously different for both the documents.

    Scenario 2: "after making the 'name' in PI to null"

    Now, all the instances of either same or different documents open without errors. but only the first opened form is functional.

    When we click on any button on the toolbar in the second (any form other than the first opened form), Infopath reports the error "Infopath has encountered an error.The operation failed."

    this is how we are opening the forms.
    ---
    Response.Clear();
    Response.ContentType = "application/ms-infopath.xml";
    Response.ContentEncoding = Encoding.UTF8;
    Response.AddHeader("content-disposition","attachment;
    filename=" + strDocumentName + ".xml");
    Response.Write(infopathXmlDoc.OuterXml);
    ---

    Thanks for your time and patience,
    Kumar
  • 06-01-2006 10:16 AM In reply to

    Re: Infopath - C# - Catastrophic failure

    Scenario 1: Default behavior of Infopath
    i.e. "without making the 'name' in PI to null"

    a) say, we opened doc1.xsn successfully.
    If we open doc1.xsn again(second instance), Infopath fails to open the second instance with error message "Catastrophic failure". thats probably because the 'name' in PI is same for both of 'em.


    In your above scenario, are there two solutions named "doc1.xsn" or is it only one solution. If they are two solutions it is bound to get such kind of error, because two solutions with same name cannot be opened in a machine at the same time.
  • 06-03-2006 02:49 AM In reply to

    • kumar
    • Not Ranked
    • Joined on 05-30-2006
    • Posts 3

    Re: Infopath - C# - Catastrophic failure

    Making the 'name' (in PI) to null allowed us to open multiple Infopath documents. and the second problem seems to be something to do with the MS office service pack being used. coz, we are not able to repro this erroneous behavior on all the machines.

    we concluded (not with 100% confidence yet) that installing office SP2 should solve the problem.

    Thanks guys for your time.

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.