'A fully trusted form with a external task pane that updates the form DOM' --> is this possible? - InfoPath Dev
in

InfoPath Dev

'A fully trusted form with a external task pane that updates the form DOM' --> is this possible?

Last post 04-04-2008 01:01 AM by Albert. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-03-2008 06:27 AM

    • Albert
    • Top 500 Contributor
    • Joined on 04-03-2008
    • The Netherlands
    • Posts 32

    'A fully trusted form with a external task pane that updates the form DOM' --> is this possible?

    Hi all,
     
    I've been trying to solve this problem, but i can't get it to work...
     
    Problem
     

    Access denied message when trying to access the DOM from custom task pane jscript code:

    var objDOM = window.external.XDocument.DOM;

    Situation

     InfoPath 2007 form:
    Internet Explorer settings:
    • Local Intranet:
    • http://server in websites list (no https)
    • Cross domain access turned on
    • Trusted websites
    • No entry’s in websites
    • Cross domain access turned on

    I've tried...

      Access denied?
    Lowering form security setting from Fully trusted to Domain No
    Adding http://server to Internet Explorer Trusted websites Yes
    Add taskpane.HTML (and .js) to the recourse files and refer to its location No
    Create a temporary certificate, sign the form and publish it to http://server/path Yes
    Create a temporary certificate, sign the form and publish it to http://server/path, add http://server to Internet Explorer Trusted websites Yes
     

    According to http://msdn2.microsoft.com/en-us/library/bb229917.aspx the DOM property (or GetDOM method) has security level 2:

    Security Level 2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
    According to http://msdn2.microsoft.com/en-us/library/bb251020.aspx a domain is a location, and the location determines permissions:
     
    The type of identification used and the domain (location) from which the form template is opened determines which Internet Explorer security zone permissions the form will inherit.

     

    If I read statements above I expected the ‘Create a temporary certificate, sign the form and publish it to http://server/path’ to work.

    So basically i want a fully trusted form with a external task pane that updates the form DOM.

    Am I doing something wrong here? Am I trying to reach the impossible? Are there any alternatives?

     

    Regards,

    Albert

  • 04-03-2008 08:14 AM In reply to

    Re: 'A fully trusted form with a external task pane that updates the form DOM' --> is this possible?

    I would evaluate whether you need Full Trust or not.  If it is required to run some code in the backend there may be some options to move that code to a web service and remove the full-trust requirment.

  • 04-04-2008 01:01 AM In reply to

    • Albert
    • Top 500 Contributor
    • Joined on 04-03-2008
    • The Netherlands
    • Posts 32

    Re: 'A fully trusted form with a external task pane that updates the form DOM' --> is this possible?

    Clay Fox:
    I would evaluate whether you need Full Trust or not.  If it is required to run some code in the backend there may be some options to move that code to a web service and remove the full-trust requirment.
     
    Hi Clay,
     
    Too bad it's not that simple.
     
    One of the requirements is that the form has to be archived in a format like PDF. Im using the SaveAsPDFandXPS in combination with CurrentView.Export (requires fulltrust) to accomplish this. I've done some research and haven't found any method that converts xml + xsn + what-view-to-export-parameter to PDF (or any other standard).
    I should be able to create a webservice like this, but it will probably look a little bit different (like exporting to MHT). Im also running into trouble with displaying data from a secondary datasource i think.
    Printing to a PDF printer on the client crossed my mind, but it requires user interaction.
     
    Second requirement is printing the form. Im using the XmlFormHostItem.Print() method, works like a charm. But requires full trust. Alternatives that i know of requires user interaction (File-->Print).
     
    Third requirement is saving the form using a generated filename without bothering the user. Right now im using XmlFormHostItem.SaveAs(), and yes, it requires full trust. This can and will be moved to a webservice in time.
     
    Any suggestion?
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.