Opening a blank Infopath form from ASP.NET - InfoPath Dev
in

InfoPath Dev

Opening a blank Infopath form from ASP.NET

Last post 07-03-2005 12:41 AM by Patrick Halstead. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-01-2005 06:39 AM

    Opening a blank Infopath form from ASP.NET

    Hi Everyone,

    I am new to ASP.NET and I have to open a blank Infopath form from an ASP.NET page.

    I have written the following code:


    XmlDocument infoPathForm = new XmlDocument();
    infoPathForm.Load(Server.MapPath("template.xml"));
    Response.Clear();
    Response.ContentType = "application/ms-infopath.xml";
    Response.Write(infoPathForm);

    By doing this, I am able to get a message box which prompts for me to either open or save the infopath form. But Infopath itself doesn't allow me to open the form any further. It says that the "the form has been given domain security level but it is just allowed restricted security level".

    I tried to change the domain security level to full trust but still the form cannot be opened. No message was given this time.

    I think I have to set up some setting in the IIS server if it has to work. But I cannot figure out what. Does anybody know about this problem?
  • 07-01-2005 06:46 AM In reply to

    Re: Opening a blank Infopath form from ASP.NET

    I tried using

    infoPathForm.Save(Response.Output);
    instead of
    Response.Write(infoPathForm);

    It still gives the same error message

    Vikram
  • 07-03-2005 12:41 AM In reply to

    Re: Opening a blank Infopath form from ASP.NET

    Hi Vikram,
    This has to do with where you published the form. If it's published to a website or SharePoint then it will automatically receive Domain. If it's published Locally, it's more restricted. Good luck.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.