I am currently trying to implement an atom feed for my Umbraco website (The question is not Umbraco specific, please don't tag with 'Umbraco'). For testing purposes I've copied an atom feed that I found on the web (please don't tell anybody, it's probably illegal) and pasted the content inside a page template. The resulting output is an .aspx
- page, which contains nothing but the pasted code:
As you can see, it is not working, the feed is shows as text, no subscribe options and the like. Accessing the feed with a C# atom API yields an exception, saying the feed type cannot be determined.
Now I've taken the exact same content and pasted it inside another file, this time with the ending .asp
, which you can see here:
It works. It also works when I rename the file ending to .htm
, .html
or .xml
.
My questions (I've got two) (thanks in advance):
a) Are atom feeds generally not working when the file ending is .aspx
?
b) How can I provide an atom feed on an .aspx
site, when I can't change the file ending?
Ok, found it thanks to this question:
There were blank lines on top of the document in the .aspx
file...