Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6841735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:00:12+00:00 2026-05-27T00:00:12+00:00

I am generating an RSS feed using MVC 3, VBNET and EF. However when

  • 0

I am generating an RSS feed using MVC 3, VBNET and EF. However when i view the feed url in IE, its not being rendered properly – all i see is a string of text and HTML tags have been encoded. Also the image for what the rendered output looks like

enter image description here
(source: riderdesign.net)

Code:

 Public Function RSS() As ActionResult

        Dim blogTitle = "RiderDesign Blog"
        Dim blogDescription = "The latest posts from RiderDesign"
        Dim blogUrl = "http://riderdesign.com"
        Dim postUrl = "http://riderdesign.com/Blog/Post/"

        Dim blogItems = _postService.SelectPublishedPosts.ToList()
        Dim postItems = New List(Of SyndicationItem)()
        For Each item In blogItems
            Dim post = New SyndicationItem()
            post.Title = New TextSyndicationContent(item.PostTitle)
            post.Summary = SyndicationContent.CreateHtmlContent(item.PostExcerpt)
            post.LastUpdatedTime = CType(item.PostDateCreated, DateTime)
            post.Content = SyndicationContent.CreateHtmlContent(item.PostText)
            post.AddPermalink(New Uri(postUrl + item.PostId.ToString))
            postItems.Add(post)
        Next

        Dim feed = New SyndicationFeed(blogTitle, blogDescription, New Uri(blogUrl), postItems) With { _
         .Copyright = New TextSyndicationContent("Copyright " & DateTime.Now.Year.ToString() & " RiderDesign.com"), _
         .Language = "en-US" _
        }

        Return New FeedResult(New Rss20FeedFormatter(feed))
        'Return New FeedResult(New Atom10FeedFormatter(feed))
    End Function

    Public Class FeedResult
    Inherits ActionResult
    Public Property ContentEncoding() As Encoding

    Public Property ContentType() As String

    Private ReadOnly m_feed As SyndicationFeedFormatter
    Public ReadOnly Property Feed() As SyndicationFeedFormatter
        Get
            Return m_feed
        End Get
    End Property

    Public Sub New(ByVal feed As SyndicationFeedFormatter)
        Me.m_feed = feed
    End Sub

    Public Overrides Sub ExecuteResult(ByVal context As ControllerContext)
        If context Is Nothing Then
            Throw New ArgumentNullException("context")
        End If

        Dim response As HttpResponseBase = context.HttpContext.Response
        response.ContentType = If(Not String.IsNullOrEmpty(ContentType), ContentType, "application/rss+xml")

        If ContentEncoding IsNot Nothing Then
            response.ContentEncoding = ContentEncoding
        End If

        If m_feed IsNot Nothing Then
            Using xmlWriter = New XmlTextWriter(response.Output)
                xmlWriter.Formatting = Formatting.Indented
                m_feed.WriteTo(xmlWriter)
            End Using
        End If
    End Sub
End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:00:13+00:00Added an answer on May 27, 2026 at 12:00 am

    The feed is displaying correctly now without any changes to the code. Dont know why tho’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am generating an RSS 2.0 feed using System.ServiceModel.Syndication.SyndicationFeed for Outlook 2007 SP2 clients,
I am trying to generate a Google Merchant RSS Feed, using PHP's SimpleXML and
following to Generating RSS feeds tutorial, i've created my RSS feed It does't works.
am generating pdf using Zend_pdf its saving after creating I want to open it
I am generating options for my dropdown using // view.php foreach ($plants as $row):
I am generating a pdf file in asp.net c# using itextsharp. i am not
I am generating editable data grids from tables using dynamic data, however, i am
All the information I could find regarding generating RSS feeds gives examples where an
I am working on a Drupal module proving RSS feed generation (though not posting
While generating charts using RS 2008 betas, RC0 and such., I never specified any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.