Access denied by InfoPath 2007 after I've moved the .xsn - InfoPath Dev
in

InfoPath Dev

Access denied by InfoPath 2007 after I've moved the .xsn

Last post 07-16-2009 12:07 AM by gerry lowry. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 07-12-2009 01:59 PM

    • gerry lowry
    • Not Ranked
      Male
    • Joined on 07-09-2009
    • alliston ontario canada
    • Posts 21

    Access denied by InfoPath 2007 after I've moved the .xsn

    Hello,                     system:  Windows Vista Business SP1 and Office 2007 SP? (whatever is current)

    because I did not know what I'm doing, I initially created the lesson .xsn template in "Documents".

    InfoPath also put my Managed Code in "Documents/InfoPath" (or something like that).

    To make this portable and to make end users'  installations less painful,
    I was able to relocate the template and code to here:

          c:\lessons
                courses
                             1001                <==== for the created .xml files
                infoPath2007templates    <==== for the .xsn
                infoPathManagedCode   <==== for the Managed Code project that goes with the template
                infoPathSetup                 <==== for the .msi file that is created by the "Publish" Wizard

    I got everything working and could continue to edit my .xsn template and my Managed Code
    in design mode.

    Problem:  when I try to open the template to create and save a lesson form, and
                   when I try to open a previously created InfoPath .xml form,
                   I get access is denied.  Even with file permission set to Full Control for everyone,
                   I still get access is denied.

                   I moved my infoPath 2007 template from the "Documents" folder to
                   c:\lessons\infoPath2007templates using the .msi option for any user (a.k.a. "Everyone").

    So, I'm a member of Administrators and InfoPath is supposed to work for everyone BUT
    even though I've forced the file options to "Full Control", InfoPath is not co-operating.

    MORE   INFORMATION

    AFAIK, the problem has something to do with InfoPath 2007 ... I can open and modify the .xml file
    with programs like XML 2007 NotePad and also plain old NotePad.

    It's like InfoPath 2007 has some internal flag that has chosen to deny access to me, even though I am the owner of the .xsn and .xml files.

    What's the solution, please?

    Thank you.


    Gerry

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · [email protected]
  • 07-12-2009 08:08 PM In reply to

    • gerry lowry
    • Not Ranked
      Male
    • Joined on 07-09-2009
    • alliston ontario canada
    • Posts 21

    Re: Access denied by InfoPath 2007 after I've moved the .xsn

    STILL MORE INFORMATION:

    If I double click my .xsn file, instead of getting a blank form with which to work, I get:

               Microsoft Office InfoPath
                /!\ InfoPath cannot create a new blank form.
                    InfoPath cannot open the form.
                    To fix this problem, contact your system administrator.
                                       [   OK   ]
                    Form template:  C:\lessons\infoPath2007templates\studentProgressReport.xsn
                    Access is denied.

    HELP!!!!!!!!!  I am the system administrator and I have absolutely no idea as to what is going on here.

    I can access the template in debug mode and save the (Preview).

    In debug mode, everything works as expected.

    BUT, I can not open the .xml forms that I created in debug mode.

    What is going on here?

    Please advise.

    Thank you.

    Gerry

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · [email protected]
  • 07-14-2009 07:54 AM In reply to

    Re: Access denied by InfoPath 2007 after I've moved the .xsn

    Hi, Gerry:

    Let's see. Moving an .xsn always upsets it -- when you open in design mode, do you get any warnings about needing to save the template again? If you open it in design mode and then publish the .xsn someplace new (like another location on your machine), can you open the published file? The previously created xml files -- were those created with the form in its old location? If you open the xml in notepad or another text editor, you'll see in the processing instructions at the top of the file the form template the xml is connected to.

    Hilary Stoupa

  • 07-14-2009 07:38 PM In reply to

    • gerry lowry
    • Not Ranked
      Male
    • Joined on 07-09-2009
    • alliston ontario canada
    • Posts 21

    Re: Access denied by InfoPath 2007 after I've moved the .xsn

    Hi Hillary ~~ you wrote in part:  "Moving an .xsn always upsets it" ~~ imo, that's something that should come with a warning when one is creating the .xsn ~~ in my case, the pain is almost unbearable.

    I'm guessing the appropriate avoidance behaviour is to be careful where one creates the .xsn in the first place.

    My strategy for future .xsn files is to create the .xsn in exactly the same folder structure as will exist on the target hosts to which it will be deployed. 

    I'm wondering if part of the problem has to do with publishing the .xsn to the same computer that I am using for development.

    to answer your questions:

    (a) the .xsn was in my "Documents" folder.  I published it to create a .msi and then installed it to a folder off of my C: drive.

        I did this because the final version will be deployed to table PCs for use "in the field".

        I can open the published file, i.e., the .xsn only in Design mode.  When I simple try to open it, I get InfoPath cannot create a new blank form and Access is denied.

        It tells me:  "To fix this problem, contact your system administrator". ~~ that's rather usless because I am the system administrator.

        When I "Show Details", the InfoPath dialog shows me the path to the form template ... the path is correct ... after the path are the words:  Access is denied.

    (b) when I open the .xsn file in Design mode and use Debug and then Save As the .xml file, then attempt to open the .xml file, I still get Access is denied.

         I may have fixed (b) .... there is a problem with Vista that one can not accesse her/his Documents folder via a fully qualified path.

         InfoPath 2007 was pointing to manifest.xsf over in my Documents folder.  I edited the .xml file and now it appears to work.

    Sadly, I still can not create a new blank form from the .xsn file.

    Gerry

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · [email protected]
  • 07-15-2009 08:09 AM In reply to

    Re: Access denied by InfoPath 2007 after I've moved the .xsn

    Hi, Gerry:

    You say:

    I'm guessing the appropriate avoidance behaviour is to be careful where one creates the .xsn in the first place.

    My strategy for future .xsn files is to create the .xsn in exactly the same folder structure as will exist on the target hosts to which it will be deployed. 

    But with InfoPath, we want users to fill out the published form. So you aren't going to want to just give your users the form and it's source code files -- the code is compiled and included with the template files when the form is published.

    Before you moved the form, when you created a .msi and installed it, were you able to open and fill out the form? Are you using the built in InfoPath 2007 functionality to create the .msi? What happens if you publish the form to a network location and select a local drive and then try to open it? Same issue?

    As far as the pain of moving a form around on your local drive -- mainly, if you move the code folders you need to redirect the form to its source code. If you move the form (without actually publishing it, just moving it) the first time you open it in design mode, you'll need to 'save as', as you will get a warning about it having been relocate. And, as you've realized, any xml created from the template will expect the template to remain in the location it was when the xml was created.

    Hilary Stoupa

  • 07-15-2009 02:14 PM In reply to

    • gerry lowry
    • Not Ranked
      Male
    • Joined on 07-09-2009
    • alliston ontario canada
    • Posts 21

    Re: Access denied by InfoPath 2007 after I've moved the .xsn

    Hi Hilary, I appreciate you for helping.  Thank you.                           {I'm using Vista Business SP1}

    gerry lowry:
    My strategy for future .xsn files is to create the .xsn in exactly the same folder structure as will exist on the target hosts to which it will be deployed.

    By the same folder structure, my intention is so that any path references are relative to the root of the C: drive; the templates will be on disconnected tablet pcs.

    Hilary Stoupa:
    But with InfoPath, we want users to fill out the published form.

    Actually, my application is slightly different.  I use a .xml that has been created from the .xsn and prepopulate many of the fields from a SQL database.

    The tablet user will then double-click the .xml file in order to be able to complete the rest of the required information.

    I will then post-process the completed form to update the SQL database.

    Hilary Stoupa:
    So you aren't going to want to just give your users the form and it's source code files"

    agreed.  only the published version will be on the end users' tablets.

    Hilary Stoupa:
    Before you moved the form, when you created a .msi and installed it, were you able to open and fill out the form?

    I did not move the form, I copied it.  I can not remember all of the events so I may be mixing up a few things.  At some point I published it and it no longer worked from the published to location.  So I went back to the original copy which no longer worked because as far as InfoPath 2007 was concerned, there were two copies of the same template on the same computer.  If I recall correctly, I probably copied to original .xsn on top of the published version.  By now, unfortunately, my memory is quite foggy.

    Hilary Stoupa:
    Are you using the built in InfoPath 2007 functionality to create the .msi?

    Yes. It's the only way that I know how to create an InfoPath 2007 .msi.

    Hilary Stoupa:
    What happens if you publish the form to a network location and select a local drive and then try to open it? Same issue?

    Sorry, I do not know.  My guess would be yes.

    Hilary Stoupa:
    As far as the pain of moving a form around on your local drive -- mainly, if you move the code folders you need to redirect the form to its source code. If you move the form (without actually publishing it, just moving it) the first time you open it in design mode, you'll need to 'save as', as you will get a warning about it having been relocate. And, as you've realized, any xml created from the template will expect the template to remain in the location it was when the xml was created.

    Slowly, I'm beginning to understand the process.  I've never had this type of horrid experience before.  For example, I've moved Word and Excel templates around before and never suffered for it.  Of course Word 2007 and Excel 2007 may behave similarily to InfoPath 2007 since they also use .xml AFAIK (the only/final x i .docx and .xlsx).

    Gerry

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · [email protected]
  • 07-15-2009 02:25 PM In reply to

    Re: Access denied by InfoPath 2007 after I've moved the .xsn

    Well, but copying the form template doesn't update the things I mentioned. At any rate, since you copied it, instead of moving it, that means your original is still in its original location! That's good news -- I assume it works fine still? That means you can create an .msi off of it and install it to see if it works! You may also want to clear your InfoPath cache of copies of the form, too, to be sure that isn't causing any of your problems... You can use Start > Run and type in InfoPath /cache clearall to clear your cache.

    Hilary Stoupa

  • 07-16-2009 12:07 AM In reply to

    • gerry lowry
    • Not Ranked
      Male
    • Joined on 07-09-2009
    • alliston ontario canada
    • Posts 21

    Re: Access denied by InfoPath 2007 after I've moved the .xsn

    Hi Hilary 

    Hilary Stoupa:
    Well, but copying the form template doesn't update the things I mentioned. At any rate, since you copied it, instead of moving it, that means your original is still in its original location! That's good news -- I assume it works fine still?

    Sorry, no.  The form has been substantially further developed, so if the original did work, it would be extremely out of date.  The original stopped working immediately after I used the .msi to install to my folder c:\ ... \infoPath2007templates.  The reason it stops working is likely because it has the same GUID (or something similar to a GUID) as the installed template.  I think there may be some registry entry that defines where a .xsn template can live based of factors which may not be that well documented, if they are even documented at all. 

    Hilary Stoupa:
    That means you can create an .msi off of it and install it to see if it works!

    Probably not.  If it did work, it would be too out of date.  I'm running out of time and getting panicky, so there are some other things I'll try first. 

    Hilary Stoupa:
    You may also want to clear your InfoPath cache of copies of the form, too, to be sure that isn't causing any of your problems... You can use Start > Run and type in InfoPath /cache clearall to clear your cache.

    I tried this.  I had high hopes.  Sadly, it did not make any difference.

    Thank you for your continuing stream of ideas.

    Gerry

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · [email protected]
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.