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

  • Home
  • SEARCH
  • 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 786519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:03:17+00:00 2026-05-14T21:03:17+00:00

I developed a webapplication,Now i want to create Rss feeds for my website. In

  • 0

I developed a webapplication,Now i want to create Rss feeds for my website.
In my application i have a module call Film news, which contain the latest news of the film stars. Now i want to create rss feeds for that module. the news contains title and description. How can i create rss feeds for my application?

  • 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-14T21:03:18+00:00Added an answer on May 14, 2026 at 9:03 pm

    Here’s the code i use for my feed, It’s just an .ashx (Generic handler), which I point my website at.

    Remember to add this little piece of html to your site:

    <link rel="alternate" type="application/rss+xml" href="/rss.ashx" title="Rss feed for yourdomain.com" /> 
    

    And here’s the complete handler code:

    public class rssHandler : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            var Response = context.Response;
    
            // Prepare response
            Response.Buffer = false;
            Response.Clear();
            Response.ContentType = "application/rss+xml";
            Response.Cache.SetExpires(DateTime.Now.AddMinutes(10));
            Response.Cache.SetCacheability(HttpCacheability.Public);
    
            // Create an XmlWriter to write the feed into it
            using (XmlWriter writer = XmlWriter.Create(Response.OutputStream))
            {
                // Set the feed properties
                SyndicationFeed feed = new SyndicationFeed
                    ("yourdomain.com",
                    "Some description of your feed",
                    new Uri("http://www.yourdomain.com"));
    
                // Add authors
                feed.Authors.Add(new SyndicationPerson
                    ("yourmail@yourdomain.com",
                    "your name",
                    "http://www.yourdomain.com"));
    
                // Add categories
                NewsType[] categories = (NewsType[])Enum.GetValues(typeof(NewsType)); // NewsType is a enum I use, which is custom created
    
                foreach (var category in categories)
                {
                    feed.Categories.Add(new SyndicationCategory(category.GetDescription()));
                }
    
                // Set copyright
                feed.Copyright = new TextSyndicationContent
                    ("© Copyright 2009 your name");
    
                // Set generator
                feed.Generator = "yourdomain.com";
    
                // Set language
                feed.Language = "da-DK";
    
                // Add post items
                List<SyndicationItem> items = new List<SyndicationItem>();
                var newsList = News.GetLatest(20);
                foreach (var news in newsList)
                {
                    string url = GetShowUrl(news);
                    SyndicationItem item = new SyndicationItem();
                    item.Id = news.ID.ToString();
                    item.Title = TextSyndicationContent.CreatePlaintextContent(news.Name);
                    item.Content = SyndicationContent.CreateXhtmlContent(news.Content);
                    item.PublishDate = news.DateCreated.Value;
                    item.Categories.Add(new SyndicationCategory(news.NewsType.Value.GetDescription()));
                    item.Links.Add(new SyndicationLink(new Uri(url), "alternate", news.Name, "text/html", 1000));
                    items.Add(item);
                }
                feed.Items = items;
    
                // Write the feed to output
                Rss20FeedFormatter formatter = new Rss20FeedFormatter(feed);
                formatter.WriteTo(writer);
    
                writer.Flush();
            }
            Response.End();
        }
    
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    
        private string GetShowUrl(News news)
        {
            // Returns proper absolute URL to the item
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application which has Chart Controls. I have developed a
I have a web application developed with ASP.net and C# that is running on
I've never developed a web application that uses distributed memory. Is it common practice
We provide a web application with a frontend completely developed in Adobe Flash. When
I want to develop a mobile web application using asp.net 3.5 that can be
I develop a web application that needs to be load balanced across 4 webservers.
I'm starting to develop a web application in PHP that I hope will become
I've been tasked to develop a web application to cover one of our business
I ask this because at work I am supposed to develop a web-application that
I am working on a small team of web application developers. We edit JSPs

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.