Form opening takes forever as soon as managed code is added, even with no code. - InfoPath Dev
in

InfoPath Dev

Form opening takes forever as soon as managed code is added, even with no code.

Last post 10-13-2009 06:39 AM by caust. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-11-2009 01:16 PM

    • caust
    • Not Ranked
    • Joined on 10-11-2009
    • Posts 3

    Form opening takes forever as soon as managed code is added, even with no code.

    I read everywhere that people are enjoying developing behind infopath forms with managed code. I don't understand how it works because as soon as I generate a project by adding my first event, forms based in the template immediately take 1 - 5 minutes to open. It's simple without managed code, forms open immediately. Using VBScript (which I can't stand) forms open immediately. Using C# or VB forms take forever to open. I'm not loading data from a data source. I don't have a lot of controls. I'm so confused as to how I've found an issue that no one on the internet has ever posted about. :-)

    I would be so grateful if someone might tell me what I'm doing wrong. I want to use C# behind infopath forms. But it isn't feasible if forms take minutes to open. It almost seems like the form is trying to access a network location on open when code is part of the template. This shouldn't be the case because the only data sources are found in the built-in myFields groups which I assume are part of the form template.

    Please Help Infopath gurus

  • 10-12-2009 09:20 AM In reply to

    Re: Form opening takes forever as soon as managed code is added, even with no code.

    whenever u deploy a form, specially a form with code behind, first time it is loaded it takes some time. are you talking about that or your form takes more time in general

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 10-12-2009 03:51 PM In reply to

    • caust
    • Not Ranked
    • Joined on 10-11-2009
    • Posts 3

    Re: Form opening takes forever as soon as managed code is added, even with no code.

    Thanks a lot for your reply, Qazi.

    When you say "deploy" do you mean create a new form from a template... by double-clicking on the template file, or clicking the "Create" button in a sharepoint form library? If so, then deploying takes a long time. And everytime the form is opened after it is initially created, it takes a long time. It's not just a matter of seconds, it takes minutes. Users think that their infopath app is crashing.

    Building the project only takes a matter of seconds. If that's what you mean by deploy.

     My code project doesn't even contain any statements. The event methods are just empty shells. I need to troubleshoot this form creation/opening issue before I'll even bother with actual.

     Thanks again for your post.

  • 10-12-2009 06:47 PM In reply to

    Re: Form opening takes forever as soon as managed code is added, even with no code.

    by deploy i meant publishing to the site, when you publish a form to a site and then the first form takes lot of time after which the performance is ok. But your seems to be a different case.

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 10-13-2009 06:39 AM In reply to

    • caust
    • Not Ranked
    • Joined on 10-11-2009
    • Posts 3

    Re: Form opening takes forever as soon as managed code is added, even with no code.

    I've attempted what you suggested... 1) Published InfoPath form with C# code behind to a SharePoint Form Library, 2) Opened an instance of the form. (It took over a minute) 3) I closed the form and opened a new form. (Again, it took over a minute.)

     <sigh> I really hate working around VBScript limitations. I would love to be able to code C#. Any other suggestions? I'm using InfoPath 2007, SharePoint 2007, Visual Studio 2005... Any other information that might be useful?

    Thanks again for the posts.

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