+1-888-365-2779
Try Now
More in this section

Forums / Deployment / basic rss feed generation

basic rss feed generation

13 posts, 0 answered
  1. Ron
    Ron avatar
    33 posts
    Registered:
    04 Aug 2008
    19 Sep 2008
    Link to this post
    Before I dig into code, should the rss feed work in the Community Site as delivered once you setup a feed channel in administration from the News? I set the news.rss file to be in the root for  the site. What activates the generation of the feed file and when?

    After completing the setup for the channel I don't find any .rss files.
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    19 Sep 2008
    Link to this post
    actually the rss file doesn't exist. what happens is the .rss file is intercepted by sitefinity, similar to how the pages you create don't exist, but are rewritten urls... when you make the news.rss file it registers that url and whenever it's requested, sitefinity takes over and generates the feed from the news items.

    at least, that's my understanding of how it works.
  3. Ivan
    Ivan avatar
    478 posts
    Registered:
    16 Jun 2015
    20 Sep 2008
    Link to this post
    Hi SelArom & Ron,

    yes, SelArom correctly concluded that requests for .rss extensions are intercepted by Sitefinity and the RSS feed is being generated on the fly. So, to answer your question Ron, RSS is generated on the fly when Sitefinity receives a request for a file with .rss extension.

    You can find more about implementing RSS functionality from our developer manual:
    http://www.sitefinity.com/help/developer-manual/services-rss-implementing-rss-functionality.html

    I hope you'll find this information helpful. Please let us know if there is anything else we can do for you.

    Sincerely yours,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  4. Ron
    Ron avatar
    33 posts
    Registered:
    04 Aug 2008
    22 Sep 2008
    Link to this post
    I am new to the rss feeds but shouldn't there be a .xml or .rss in the root for a rss reader to see and read when you subscribe to the feed from the outside?

    For example, when I subscribe to a feed with one of my readers I can tell the reader where the feed is and it looks for a xml or rss file read. Isn't this the say way?
  5. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    22 Sep 2008
    Link to this post
    that is one way of doing it, some systems will periodically generate the xml and write it to a physical file that can be accessed directly. the problem with this is that it's not always up to date. say if it's generated every 30 minutes, and an update comes after 15 minutes. the feed will be out of date for 15 more minutes until the file is written out again.

    sitefinity's approach is to intercept the request, and generate the rss xml output and feed it directly to the response as if it was the file. it's like a "virtual" file that is generated on the fly each time it's requested. this way you will always have the most up to date data because it's being rendered right during the request.

    these options are transparent to whichever reader you choose, because when you point them to the .rss file in sitefinity, even though it doesn't physically exist on the server, when it is requested, the full rss feed is created and sent as a response, as if it really was there all along. so to your reader, it feels and acts as if the file was there.

    hope that this makes sense and was helpful
  6. Ron
    Ron avatar
    33 posts
    Registered:
    04 Aug 2008
    23 Sep 2008
    Link to this post
    I also checked for the mime type extension and it is not implemented at discountasp.net by default for .rss. I have asked them to add that. That may be part of the problem of not seeing it.
  7. Ron
    Ron avatar
    33 posts
    Registered:
    04 Aug 2008
    23 Sep 2008
    Link to this post
    I added the mime type application/rss+xml for the extension .rss in IIS. Now that should activate the rss feed if I link with for example:

    http://www.domain.com/news.rss
  8. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    23 Sep 2008
    Link to this post
    make sure it's registered under httphandlers section of web.config as well:

    <add path="*.rss" verb="*" type="Telerik.Rss.RssHttpHandler, Telerik.Rss" /> 
  9. Ron
    Ron avatar
    33 posts
    Registered:
    04 Aug 2008
    24 Sep 2008
    Link to this post
    Web.config does have that httphandler as noted. Discountasp.net has added the mime type .rss but when you run the link http://www.domain.com/news.rss I still get a 404 error.
  10. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    24 Sep 2008
    Link to this post
    i think it needs to be registered as more than just a mime type. it also needs to be mapped as an isapi extension so that .rss files are mapped to the isapi executable for asp.net. make sure your host has registered .rss in isapi as well as mime type

    hope this was helpful
  11. Ron
    Ron avatar
    33 posts
    Registered:
    04 Aug 2008
    24 Sep 2008
    Link to this post
    Has this not come up before with discountasp.net hosting? I am surprised this is a setup issue with the current high profile social networking so prevalent in today's market.
  12. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    24 Sep 2008
    Link to this post
    I can't comment about the hosting specifically because I do not use them, but .rss is not a universally common extension for feeds.

    some use xml, some use rss some use php some even use aspx and ashx. since it's not something that's "built in" to IIS, and every application does it differently, it makes sense that it wouldn't be enabled by default until you tell the host that you're using sitefinity, in which case they (discountaspnet being a featured partner or something like that with telerik) should be able to map all the correct extensions including .rss, .template and some of the others...

    but like i said it depends on which cms system (if any!) their users end up using
  13. Ron
    Ron avatar
    33 posts
    Registered:
    04 Aug 2008
    25 Sep 2008
    Link to this post
    The solution was mapping the rss extension to 2.0 framework as discussed below by the host.

    Dear Customer,

    The rss extension has been mapped to the 2.0 framework. Please be advise that the application needed the script map in order to work and not a mime type. We have removed the mime type from your site Thank you, Jorge

    DiscountASP.NET - Microsoft Gold Certified Partner

    It now displays the rss feed when you type in domain.com/news.rss.

Register for webinar
13 posts, 0 answered