When streaming xml from IE, Infopath calls aspx page multiple time

G

Graeme

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();

}
 
G

Graeme

Any takers for this? Why would Infopath call the aspx page at all, leave
alone several times? Each time my database is getting hit and the xml
downloaded. Strangely, I don't see this happening with Firefox - only IE7.
 
G

Graeme

Any Infopath devs out there that can explain this? How does Infopath even
know about the aspx page. See this link for an image of the Fiddler trace:

http://screencast.com/t/NTEwOWFmND

The first call to the page is from IE which downloads the xml, but then
infopath calls for the same data (18,601 bytes) 3 more times. Don't know
what all the other dozen or so calls are either....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top