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

Discussion in 'XML' started by davidanthonybradbury@gmail.com, Jan 24, 2008.

  1. Guest

    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
     
    , Jan 24, 2008
    #1
    1. Advertising

  2. Andy Dingley Guest

    On 24 Jan, 06:39, wrote:
    > 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.
     
    Andy Dingley, Jan 24, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    768
    SpaceGirl
    Feb 25, 2005
  2. Motta
    Replies:
    1
    Views:
    530
    Andy Dingley
    Jun 9, 2004
  3. Jake Barnes
    Replies:
    1
    Views:
    423
    Andy Dingley
    Nov 14, 2005
  4. Scott Gordo
    Replies:
    5
    Views:
    708
  5. Jonathan Groll
    Replies:
    1
    Views:
    279
    Kouhei Sutou
    Jun 27, 2009
Loading...

Share This Page