Infopath crashes - InfoPath Dev
in

InfoPath Dev

Infopath crashes

Last post 05-16-2005 06:41 AM by christophe. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-28-2005 11:00 AM

    Infopath crashes

    Hi,

    I'm sorry but I am a beginner in Infopath development. I've tried to develop my own
    function in C# to handle a click in a button. It works perfectly in debug mode (from VS.NET), but as soon as I publish the form and try to open it in the normal way Infopath crashes and cannot open my form.

    I should forget something ?

    Any ideas or advices would be greatly appreciated.

    Thanks in advance

    Christophe
  • 04-28-2005 12:07 PM In reply to

    Hi Christophe, Welcome to the board.
    Can you provide with more inforamtion here, please copy paste your c# Onclick funtion here.
    Probably you are hardcoding values which are not available when the form is published.

    Agni
    InfoPathDev India
  • 04-28-2005 12:18 PM In reply to

    Hi Agni,

    At the beginnig, I've programmed a much complex function wich opens a form to browse a sharepoint library, and the I've seen the crash, I replaced all my code with this one.

    [InfoPathEventHandler(MatchPath="CTRL1_5", EventType=InfoPathEventType.OnClick)]
    public void CTRL1_5_OnClick(DocActionEvent e)
    {
    // Write your code here.
    thisXDocument.UI.Alert("Hello World");
    }

    And even with this very simple single line Infopath crashes.

    Do you have an idea of what happens ?

    Thanks a lot

    Christophe
  • 05-01-2005 08:31 PM In reply to

    Sorry for being late,
    Please add a try catch block around "thisXDocument.UI.Alert("Hello World");" and check out what exception it is throwing.
    Steps you follow here are
    1. Add "try catch" block to the statement.
    2. Compile the solution and Publish it.
    3. Open the form from sharepoint.
    4. Attach Infopath form to your code and put a breakpoint in the try block.
    5. Click on the button and check out whats the exception.

    1. One problem could be security issue. Check out what is the level of security that you have on the form.
    If the level of security is restricted it does not allow Managed code.

    2. One more security issue could be if your sharepoint and your machine are on not part of same domain then also managed code is not allowed.

    Agni
    InfoPathDev India
  • 05-16-2005 06:41 AM In reply to

    Hi Agni,

    Thank you very much, you are right, the security was the problem.

    Thanks a lot for your help

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