RSS in ASP file - How to make this work in IE?

  • Thread starter davidanthonybradbury
  • Start date
D

davidanthonybradbury

I have created an ASP file which builds an RSS feed line by line from
a database of publications, eg

response.Write("<item><title><![CDATA[" & strDocTitle & " - " &
strDate & "]]></title>")
response.Write("<description><![CDATA[" & strDescription & "]]></
description>")

The final ASP file will open in Firefox but not in IE. In Firefox I'm
asked if I want to subscribe to this feed and all the publications are
shown. IE just hangs. This is both IE 6 and IE 7.

Also, I was hoping to embed the ASP file into an html page listing the
RSS feeds we offer, so that the RSS icon appears in the address bar on
RSS enabled browsers. However, adding the line

<link href="/pubs/baf/indexRSS.asp" rel="alternate" type="application/
rss+xml" title="Publications" />

to the html page doesn't work. The RSS icon appears but when clicked
you get an error because the page itself is ASP. Is there any way
around this?

Thanks very much
David
 
A

Andy Dingley

I have created an ASP file which builds an RSS feed line by line from
a database of publications, eg

response.Write("<item><title><![CDATA[" & strDocTitle & " - " &
strDate & "]]></title>")

Yes, well just feckin' well stop it OK!? Use an XML DOM, do it
properly. I'm tired of mucking out feeds generated by people who
thought that Response.Write() was an appropriate and complete
substitute for serialising XML.

It's also not a brilliant idea to over-use CDATA sections in RSS.
They're not as widely supported as you might wish. They're also
unnecessary in nearly all cases (and poorly defined in the rest!).


The final ASP file will open in Firefox but not in IE.

So tell us the URL, then we might have a hope of seeing what's wrong.

For starters I'd want to know the HTTP content-type, although that's
rarely important for RSS (it's so widely abused that RSS readers have
to be promiscuous in what they accept).

IE just hangs. This is both IE 6 and IE 7.

I think you meant "IE should just be hung"

The RSS icon appears but when clicked
you get an error because the page itself is ASP.

A server that understands scripts may take such a source-code "page",
interpret the script in it and then serve up the resultant document to
the web. These input and output "pages" don't have too much connection
between them. The type of the served page certainly isn't "ASP", it's
whatever the HTTP Content-type headers you generate for it claim it to
be. These should be RSS, they're probably text/plain or text/html
instead.

The headers on the actual page served will trump the content-type you
predicted in the link.
 

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

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top