When streaming xml from browser, Infopath calls aspx page multiple times - InfoPath Dev
in

InfoPath Dev

When streaming xml from browser, Infopath calls aspx page multiple times

Last post 01-12-2010 01:14 AM by Graeme. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-07-2010 01:12 AM

    When streaming xml from browser, Infopath calls aspx page multiple times

    I have a simple aspx page that reads Infopath XML from a database and sends it to the client. Works fine, but I notice using Fiddler that Infopath then calls the same aspx page 5 or 6 times for the same data. Any idea why it would do this? Here's the sample code:

    protected void Page_Load(object sender, EventArgs e)

    {

        DataSet documentDataSet = new DataSet();

        using (SqlConnection conn = new SqlConnection("server=rcs2dbdev;database=rcs2;user id=xxx;password=xxx;"))

        {

            conn.Open();

            SqlCommand cmd = conn.CreateCommand();

            cmd.CommandText = "select Name, InfoPathDoc as InfopathFormXML from Document where ID = 123";

            SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(cmd);

            sqlDataAdapter.Fill(documentDataSet);

        }

        XDocument xDoc = XDocument.Parse(documentDataSet.Tables[0].Rows[0]["InfopathFormXML"].ToString());

        Response.AppendHeader("Content-disposition", "attachment; filename=" + documentDataSet.Tables[0].Rows[0]["Name"]);

        Response.ContentType = "application/ms-infopath.xml";

        Response.Write(xDoc);

        Response.Flush();

        Response.End();

    }

  • 01-12-2010 01:14 AM In reply to

    Re: When streaming xml from browser, Infopath calls aspx page multiple times

    Here is a link to an image of the Fiddler trace showing the problem:

    http://screencast.com/t/NTEwOWFmND

    The data is first downloaded by IE, but then IP downloads it all again 3 times. How and why? I hate this voodoo stuff...

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.