"XML page cannot be displayed" added to XML Download

I'm using these lines to initiae a download of an xml file. 

Response.Clear()
Response.ContentType =

"application/octet-stream"
Response.AddHeader("Content-Disposition", _
"attachment; filename=""" & varFileName & """")
Response.Flush()
Response.WriteFile(varFileName)

  File looks fine in XML viewer just after created.

But the output of the download, when viewed as XML, has the following, fully formatted http error imbedded in it:

 

XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


Cannot have a DOCTYPE declaration outside of a prolog. Error processing resource 'file:///E:/1277_SW_DEV/b_SUPPORT/0100_XLS...

 

which renders the file unusable.

 

Any suggestions on how to eliminate this from happening would be appreciated.

Thanks!

0
codequest
11/29/2006 10:09:15 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

2 Replies
769 Views

Similar Articles

[PageSpeed] 46

Ah, I see now (using a better xml viewer) that the downloaded xml file has the HTML from the "sending page" appended to it...that's what led to the error above.

....and I'm still clueless as to why that's happening....

0
codequest
11/29/2006 10:16:38 PM
0
codequest
11/30/2006 7:58:47 PM
Reply:

Similar Artilces:

When I get .XML document with Request.Form["xml"].ToString(); it gets error.
XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(Request.Form["xml"].ToString());  I want system doesn't interrupt the code execution. How can I do system doesn't give error message?  Thanks.  Error Message  A potentially dangerous Request.Form value was detected from the client (xml="...8859-9" ?><BORCELIK><Tarih>09/...").  ...

get "webservice XML-value" in the page that submits and not in a new page
 Hello everyone,in the next webpage it is shown how you can call a webservice in html by submitting a form. http://www.w3schools.com/webservices/ws_use.aspis it possible to get the return value of the webservice in the page that submits... and that a new page does Not open up....thx,see my blog at www.Interdevelopments.com and check the future of open mobile widget solutions at www.glowe.org...

"The XML page cannot be displayed" and OutputCache
Hi I'm dispaying XML on my web page by: httpApp.Response.ClearContent();httpApp.Response.ContentType = "text/xml"; httpApp.Response.Write(strXml);   I have 2 identical pages, the only difference: Default_Testing.aspx - No Caching Default.aspx - <%@ OutputCache Duration="86400" VaryByParam="none" %>  - I want the page to update once a day   The Bug: When loading Default_Testing.aspx there is no problem and I can see the Xml even if I refresh the page. But When loading Default.aspx I can see the XML only once and after I r...

OPML and RSS links on .text home page return "The XML page cannot be displayed"
Ok, in my previous post I said I am having no other issues that the one mentioned in that post. But, as I was further scutinizing my .text site I found a few more issues I'm having. On the home page if I click on the OPML or RSS links I get the following response. Any suggestions? The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- Switch from current encoding to specified encoding not sup...

"The XML page cannot be displayed" when running the iManager
I have a problem when startup the iManager on Novell NetWare 6.5 SP4a. The browser shows following error: - The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. --------------------------------------------------------------------------- ----- System does not support the specified encoding. Error processing resource 'https://10.236.40.249/nps/servlet/portalservice?... <?xml version="1.0" encoding="UTF-8" standalone="yes"?> We ha...

Urgent!!! --- problem while export to EXCEL
Error Message: =================================================The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. The server did not understand the request, or the request was invalid. Error processing resource 'http://www.w3.org/TR/xhtm... ===============================================   MY C# code:      ExportEquipment export = new ExportEquipment();          string path1 = export.ExportEquipment...

how to display images created on the fly """WITH THE REST OF THE PAGE"""
I need to create an image on the fly and then show it in the page, the problem is that if i create an imamge i also have to switch page content type to image/gif, so only the image is showed and not the rest of the page.How can i create a streaming image and display it?        Dim objBtm As Bitmap = New Bitmap(150, 45)        Dim objGraph As Graphics = Graphics.FromImage(objBtm)        Dim rect As New Rectangle(0, 0, 150, 45)        Dim meContext As Http...

If xml doc has multiple namespace "xmlns", how should xslt be built in order to display the content of xml doc?
Hi Guys,  If xml doc has multiple namespace "xmlns", how should xslt be built in order to display the content of xml doc? Thanks. The following is the example:  <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="report.xsl"?> <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"             xmlns:rd=http://schemas.microsoft.com/SQLServer/reporting/reportdesigner> <BottomMargin>0.5in</BottomMargin> <RightMargin>0.25in</R...

Get "Mail"/"Get "News" / "Write"/"Post" buttons?
If the "Get Mail" button text changed to "Get News", and "Write" changed to "Post" when TB's in the news-reading mode, it would save me and probably others from constantly forgetting to make the change before proceeding. :-) Or is there an extension to do this which I don't know about? Thanks! Bob Bob P wrote: > If the "Get Mail" button text changed to "Get News", and "Write" > changed to "Post" when TB's in the news-reading mode, it would save me > and probably others...

superreview granted: [Bug 309721] Broken "window.screen" within HTML page inserted via <object type="text/html"> in XHTML pages sent as application/xhtml+xml : [Attachment 199623] Patch to try
Johnny Stenback <jst@mozilla.org> has granted Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 309721: Broken "window.screen" within HTML page inserted via <object type="text/html"> in XHTML pages sent as application/xhtml+xml https://bugzilla.mozilla.org/show_bug.cgi?id=309721 Attachment 199623: Patch to try https://bugzilla.mozilla.org/attachment.cgi?id=199623&action=edit ------- Additional Comments from Johnny Stenback <jst@mozilla.org> r+sr=jst ...

Web pages not loading completely or getting "page cannot be displayed"
I'm having a problem that I'm hoping someone can help me with. Server is Netware 5.1 sp8 running Bordermanager 3.8 sp4. SP5 is not installed because the readme indicates Netware 6.5 is required. The issue is some web pages will not load completely the first time they are accessed, leaving 'empty graphic' icons (red X inside a box) where graphics should be. In some cases users will get a 'page cannot be displayed' error. It's clear this is a proxy problem because when I configure the browser to go straight out the problem does not occur. Below is the proxy...

Page Times out and Displays "Page Cannot Be displayed"
Hi, I have a simple page which expects a few inputs from the user based on which it will update the database. The DataBase Operation lasts for about a couple of hours. The page waits for sometime(about 15 min) before showing up the "Page cannot be Displayed" Is there a way I can handle it by changing configurations? Im not using ajax framework or any other state managing techniques. Thanks in advance for your help. Regards, Madan Hi, it can be for different reasons, your web.config buffer tag might be set to true in your web.config file. <Pages Buffer="True...

wrong character display ("�" displays as "�" or "?")
Using ODBC Sybase 11 router, the character "�", saved in a varchar column in Sybase 11.5 will display as "�" or "?" in SQL Advantage or in our application. This just started occuring once we changed our applications to use 32 bit ODBC connection, rather than DBLib 16 bit. What is really interesting is that our our old 16 bit application runnning on the same PC returns the characters correctly, while 32 bit application running against ODBC returns another character, usually the degree symbol. Both versions of this program are accessing the same data sou...

"Attempt to use an "XML" extension that has not been registered..."
Hello, I am using Reporting Service in server mode.I currently have a report in which in include a few subreports. All of them use the same datasource (sqlserver 2005 database connectionstring)I have to add another report which is based on XML data. To do so, I created a new shared datasource, designed my query, added the report parameters, tested the query... This works but when I try to deploy this report on the report server I am getting an error I do not understand:"Attemps to use an "XML" extension of data that has not been registered for this report server"I do...

Web resources about - "XML page cannot be displayed" added to XML Download - asp.net.getting-started

Resources last updated: 12/25/2015 3:22:36 PM