InfoPath Loading problem.

D

David

Hi, I have an InfoPath SP1 form, which uses C# back end code. The first time
that a user tries to load the form, the form takes quite some time to load: a
good 20 seconds or more. This happens every time the PC is rebooted. If a PC
is not rebooted, the form only takes a couple of seconds to load.

After several testing, it seems that if I create the exact same form, with
just the _Startup method, the loading time is reduced by just a couple of
seconds.

If I create the same form, just from InfoPath, without having any back-end
code, (which then loses most of my functionality) the form loads almost
immediately.

It seems that there must be some caching which takes place every time the PC
is restarted. Can I adjust this cache in such a way that unless the form is
updated, the form loads immediately, just as it does if the PC is not
rebooted?

I tried using Application.CacheSolution, and Application.RegisterSolution,
but none of these methods have helped.

I've been trying to find a solution to this problem for ages, and I'm
getting desperate.
 
S

Scott L. Heim [MSFT]

Hi David,

What is the code that you have on Load (or _Startup) event?

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David

The OnLoad instantiates a Web Service, whilst the OnLoad performs a few
accesses on these services and populates some data. This code has been timed,
and does not take much time to execute, typically not more than 3 seconds in
a worst case scenario.

The most time taken is before the OnLoad even starts to execute. It seems
that InfoPath starts to access the hard disk continously for a good number of
seconds.
 
S

Scott L. Heim [MSFT]

Hi David,

Is your form set to "Full Trust?" If so; how have you implemented the full
trust? Are you using a digital certificate or did you use the Regform tool?

Also - is the form being instantiated from the user's machine or are they
browsing to, say, a Sharepoint site and opening the form?

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David

Yes, fully trusted, signed with a digital Certificate with form signing
capabilities issued from a certificate authority we have created within our
company.

The form is deployed on a SharePoint site (Document library), and the users
open it from there.
 
S

Scott L. Heim [MSFT]

Hi David,

Would you have the ability to test another form, with C# code, that does
not require a digital certificate? What I am getting to is I am wondering
if the delay is InfoPath validating the certificate and/or the user.

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David

I tried a simple Hello World Form, with empty form code, no signatures, and
it takes about 12seconds to load. With InfoPath thrashing the hard disk while
loading the first time.

My feeling is that this has something to do with loading the managed code
the first time.
 
S

Scott L. Heim [MSFT]

Hi David,

Unfortunately I am not experiencing the same behavior - let me describe the
test I just completed:

- Created a new VB.NET InfoPath solution with a blank form
- Added a text box and a button to the form
- On the click event of the button, added the following code:

Dim objTextbox As IXMLDOMNode
objTextbox =
thisXDocument.DOM.selectSingleNode("//my:myFields/my:field1")
objTextbox.text = "Scott"

- Published my XSN file to a Sharepoint site (different machine - same
domain)
- Navigated to that site and clicked "Fill out this form" - this launched
in about 1-2 seconds
- Filled out the form and saved it back to the library (now I have a Form1
in the list)
- Closed my browser, cleared my InfoPath cache just to be sure (Start|Run
InfoPath /cache clearall and then closed InfoPath), navigated back to my
site and this time opened Form1 - result: again, maybe a second to open.

Do these steps mirror what you are doing?

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top