Home > MOSS 2007 > Openning IP Forms With Domain Security From VS.NET

Openning IP Forms With Domain Security From VS.NET

September 2nd, 2008 Leave a comment Go to comments

This one is just a quick tip which I get asked a lot!

1) You configured the security level of your IP forms to Domain.

2) You saved the form in a folder in your project.

3) You published the form into another folder again in your VS project.

workflowproject.jpg

4) You checked-in your code.

5) Someone else gets the latest version of your code and tries to open the InfoPath Form. They double-click on the formĀ  in the visual studio andĀ  they get this error:

Forms that require the domain permission level contain features that access information on a network, such as data connections, linked images, and code.

infopatherror.jpg

Just go to the file system (VS 2008 gives you Open Folder in Windows Explorer option when you right click on any folder in your solution) , right click the file and choose to open it in Design mode? That will do it!

Categories: MOSS 2007 Tags:
  1. September 3rd, 2008 at 04:18 | #1

    What’s your take on actually using the expanding source version when working on forms e.g. having teh manifest.xml file and all .xsds extracted and source controlling this invidually. Then you can save back to .xsn when you publish.

  2. Reza Alirezaei
    September 3rd, 2008 at 08:49 | #2

    Jeremy,

    I think it really depends. Personally I like to Save as Form Template (not as Source) and deal with xsn rather than multiple files. but as you can see above, the main schema of the form is always extracted so I can generate the .Net wrapper using xsd.exe – This needs to be re-extracted as needed. I also publish the form to the same project, but different folder (See the same form exists in two places) , one for modifying the form and another one used in the feature (this is the published form ready for packaging and deployment).

    All in all, I don’t think dealing with individual files is a big no no , as long as you have no problem with reassembling them back to a form template and publish them at that time. This doesn’t work with the way I work!

  3. September 4th, 2008 at 00:05 | #3

    Ah, so when you publish it to the second location and then package it and deploy it, how do you handle the issues around urls being inside the xsn file? I use udcx files wherever possible, but still some urls seem to be hardcoded into this form when published to a specific environment.

  4. Reza Alirezaei
    September 4th, 2008 at 11:14 | #4

    UDC files pretty much handle everything. They are also context aware meaning when using lists and doc libs they are relative to site collections. For all other external (to sharePoint) data sources UDC file is the way to go. Please be specific on what kind of datasource OR URL are you talking about here? Are you talking about a url on the form itself? If yes, where does that URL point to ? SharePoint or non-SharePoint resources?

  5. September 7th, 2008 at 06:28 | #5

    I’ve found even with UDCX files and having the relatively in a connections library to the InfoPath form…that even when you publish the form from the InfoPath Client to the library using administrative forms it contains urls.
    If you backup the farm and restore it to a Test environment and open the form and submit it it looks for the production url. Even when you go in and modify the udcx files to point to the correct places.

You must be logged in to post a comment.