|I have created a report generator that creates an XML and passes it back to the browser as an Excel Doc. It works fine but the application lives within https and seems to kill the application with this error:
Microsoft Internet Explorer
Internet Explorer cannot download DataGrid.aspx from www.mysite.com.
Internet Explorer was not able to open Internet site. The requested site is either unavailable or cannot be found. Please try again later.This creates the XML based off user selection etc.....
Dim dataDirPathXML As String = Server.MapPath("..\DataGrids\XML\")<br />
ds.WriteXml(dataDirPathXML & Session.SessionID & ".xml", XmlWriteMode.WriteSchema) <br />
Response.Redirect("..\DataGrids\DataGrid.aspx") <br />
This passes the XML back as Excel.....
Dim temp As String = Server.MapPath("XML\") & Session.SessionID & ".xml"<br />
If System.IO.File.Exists(temp) Then<br />
Dim streamReader As New System.IO.StreamReader(temp)<br />
Dim sBuilder As New StringBuilder(streamReader.ReadToEnd)<br />
Dim stringWrite As New System.IO.StringWriter(sBuilder)<br />
Dim htmlWrite As New HtmlTextWriter(stringWrite)<br />
Response.AddHeader("content-disposition", "attachment;filename=" & Session.SessionID & ".xls")<br />
Response.Charset = ""<br />
Response.ContentType = "application/vnd.xls"<br />
End If<br />
I've been to the Server.MapPath("..\DataGrids\XML\") location and the xml is not being created.
What am I missing? I've tested this out-side the https and runs fine (local host or Live production server). Please any experiences with this kind of issue would be helpful.