473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ASP Not Respecting Response.ContentType

I am trying to generate an RSS feed with ASP, however, IE will not
display the feed as an XML document, instead returning it as text.

I have <% Response.Buffer = true %> and <% Response.ContentType =
"text/xml" %> at the top of the page, but it does not make a
difference. Netscape/Mozilla recognizes the contenttype and displays
it as XML, and the feed is valid. Any help would be greatly
appreciated.

Thank you!
Jul 19 '05 #1
4 3116
John Smith wrote:
I am trying to generate an RSS feed with ASP, however, IE will not
display the feed as an XML document, instead returning it as text.

I have <% Response.Buffer = true %> and <% Response.ContentType =
"text/xml" %> at the top of the page, but it does not make a
difference. Netscape/Mozilla recognizes the contenttype and displays
it as XML, and the feed is valid. Any help would be greatly
appreciated.

Thank you!


Do you see the XML when you view the page source in IE?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
On Sun, 16 May 2004 14:32:46 -0400, "Bob Barrows [MVP]"
<re******@NOyahoo.SPAMcom> wrote:

:John Smith wrote:
:> I am trying to generate an RSS feed with ASP, however, IE will not
:> display the feed as an XML document, instead returning it as text.
:>
:> I have <% Response.Buffer = true %> and <% Response.ContentType =
:> "text/xml" %> at the top of the page, but it does not make a
:> difference. Netscape/Mozilla recognizes the contenttype and displays
:> it as XML, and the feed is valid. Any help would be greatly
:> appreciated.
:>
:> Thank you!
:
:Do you see the XML when you view the page source in IE?

Yes, I do, but IE does not display it as an XML page.
Jul 19 '05 #3
John Smith wrote:
On Sun, 16 May 2004 14:32:46 -0400, "Bob Barrows [MVP]"
<re******@NOyahoo.SPAMcom> wrote:
John Smith wrote:
I am trying to generate an RSS feed with ASP, however, IE will not
display the feed as an XML document, instead returning it as text.

I have <% Response.Buffer = true %> and <% Response.ContentType =
"text/xml" %> at the top of the page, but it does not make a
difference. Netscape/Mozilla recognizes the contenttype and displays
it as XML, and the feed is valid. Any help would be greatly
appreciated.

Thank you!


Do you see the XML when you view the page source in IE?


Yes, I do, but IE does not display it as an XML page.


OK, can you show us the source?

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #4
On Sun, 16 May 2004 17:08:04 -0400, "Bob Barrows [MVP]"
<re******@NOyahoo.SPAMcom> wrote:

:John Smith wrote:
:> On Sun, 16 May 2004 14:32:46 -0400, "Bob Barrows [MVP]"
:> <re******@NOyahoo.SPAMcom> wrote:
:>
:>> John Smith wrote:
:>>> I am trying to generate an RSS feed with ASP, however, IE will not
:>>> display the feed as an XML document, instead returning it as text.
:>>>
:>>> I have <% Response.Buffer = true %> and <% Response.ContentType =
:>>> "text/xml" %> at the top of the page, but it does not make a
:>>> difference. Netscape/Mozilla recognizes the contenttype and displays
:>>> it as XML, and the feed is valid. Any help would be greatly
:>>> appreciated.
:>>>
:>>> Thank you!
:>>
:>> Do you see the XML when you view the page source in IE?
:>
:> Yes, I do, but IE does not display it as an XML page.
:
:OK, can you show us the source?
:
:Bob Barrows
It looks like I had bad XML data, and that was causing the problem.
Thanks for your help nonetheless

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TJS | last post by:
trying to display pdf file in browser fails on this line: Response.ContentType = "application/pdf" getting an error about no declaration found for "response" what declaration is needed ???
1
by: Charlie | last post by:
Hi: I'm uploading documents into a SQL Server Image field and using Response.BinaryWrite() to download or view them in the browser. Some doc types like Adobe Illustrator and Photoshop files...
4
by: david | last post by:
I has a question: I can use Response.WriteFile to display images such as .jpg. But I can not us it to display words doc file in EI by calling Response.WriteFile("testdoc/DownloadLarge.doc"). It...
0
by: brian.fairchild | last post by:
I have a downloader page in my asp.net application that looks at a session variable to get the path to the file, checks it then downloads it using the Response object. When the "File Download"...
6
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the...
3
by: ad | last post by:
I create a MemoryStream form a dataset: MemoryStream sm= new MemoryStream(); dsHealth.WriteXml(sm); I use Response.Write() to send this XML MemoryStream as file to client. What is the...
8
by: Katie | last post by:
Hi, I am trying to set the content type and header for the response object but for some reason it doesnt set it. I tried it on dev and it worked fine but didnot on production. The difference is...
4
by: Bjorn Sagbakken | last post by:
With ASP.NET 2.0 I'm trying to display the pdf file directly in the client browser, but I only get a download dialogue box. Downloading the file works fine, but I want to view the PDF directly. ...
2
by: Nathan Sokalski | last post by:
I have an application in which I want to allow users to view certain files that are on the server, but not part of the application. To do this, I figured I would have ASP.NET read the files and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.