ASP Not Respecting Response.ContentType

Discussion in 'ASP General' started by John Smith, May 16, 2004.

  1. John Smith

    John Smith Guest

    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!
     
    John Smith, May 16, 2004
    #1
    1. Advertising

  2. 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"
     
    Bob Barrows [MVP], May 16, 2004
    #2
    1. Advertising

  3. John Smith

    John Smith Guest

    On Sun, 16 May 2004 14:32:46 -0400, "Bob Barrows [MVP]"
    <> 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.
     
    John Smith, May 16, 2004
    #3
  4. John Smith wrote:
    > On Sun, 16 May 2004 14:32:46 -0400, "Bob Barrows [MVP]"
    > <> 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"
     
    Bob Barrows [MVP], May 16, 2004
    #4
  5. John Smith

    John Smith Guest

    On Sun, 16 May 2004 17:08:04 -0400, "Bob Barrows [MVP]"
    <> wrote:

    :John Smith wrote:
    :> On Sun, 16 May 2004 14:32:46 -0400, "Bob Barrows [MVP]"
    :> <> 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
     
    John Smith, May 18, 2004
    #5
    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. Steve Hershoff
    Replies:
    0
    Views:
    414
    Steve Hershoff
    Aug 9, 2006
  2. =?Utf-8?B?bGV0dWNlIGRhbmNl?=

    why does Response.ContentType = "text/plain"; not work correctly?

    =?Utf-8?B?bGV0dWNlIGRhbmNl?=, Oct 26, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,167
    =?Utf-8?B?bGV0dWNlIGRhbmNl?=
    Oct 26, 2006
  3. Adrian Turner

    Response.ContentType not working ???

    Adrian Turner, Oct 15, 2009, in forum: ASP .Net
    Replies:
    7
    Views:
    1,743
    Andrew Morton
    Oct 16, 2009
  4. Adrian Turner

    Response.contenttype not working ???

    Adrian Turner, Oct 15, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    545
    Alexey Smirnov
    Oct 15, 2009
  5. Katie
    Replies:
    8
    Views:
    275
    Anthony Jones
    Aug 17, 2006
Loading...

Share This Page