Error "The form template is being used by an open form" ;-(

M

Michal Semhric

Hello

I allways got a following message after I moved my form from network share
of other computer to my local machine.
When a form is somewhere on "network share folder" it works ok (of course I
where I have read acess).
Same error occurs when I force more templates to use one GAC FormCode.

The error occures when I second time call method "NewFromSolutionWithData"
from
managed C# code (see bellow):

..
ApplicationClass ipApp = new ApplicationClass();
..
..
XDocument xdoc1 =
ipApp.XDocuments.NewFromSolutionWithData(dataXML1,xsnFile,1);
XDocument xdoc2 =
ipApp.XDocuments.NewFromSolutionWithData(dataXML2,xsnFile,1);
..
..

Form is set by following way:
------------------------------------------------
- was manually created using "cabarac.exe"
- Fullly trusted (also manifest.xsf contains requireFullTrust="yes")
- manifest does not contain "publishUrl" attribute.
- manually signed using "signcode.exe" (certificate is in Trusted publishers
store and trusted root authorities store)
- contains managed C# FormCode(C# .NET Compiler v7.10.6001.4
MS.NET Framework v1.1.4322)
- unchecked in Internet Explorer "Check for publisher's certificate
revocation"
- unchecked in Internet Explorer "Check for server certificate revocation"
- unchecked in Internet Explorer "Check for signatures on downloaded programs"

Machine software specification:
- WinXP SP1 !!!(Build 2600.xpsp2.040919-1003)
- MS VS2003
- MS Office 2003 + SP1 (not preview)
- before I run application I allways delete contents of FormCache

I do believe that process of my template build is wrong cause such forms
allways work when they are in shared location.
Only when they are on local drive they do not work. I do not believe that
this is a problem of WinXP SP1 cause couple
of days ago it worked perfectly.

Can anybody help me to solve this problem.

Thank You for Your reply
Michal
 
M

Michal Semhric

The problem was that manifest did not contain "publishUrl" attribute.
After setting back correct publishUrl attribute everything works again.

In wrong example I removed this attribute cause I wanted to speed-up InfoPath
loading (cause I had previously generated templates into shared location and
IP at first looks if there is no new version of template in publishUrl)

Sorry folks for disturbing. Perhaps someone will find this info usefull.

Best regards to all MS InfoPath coders ;-)
 

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