none
Generating a dynamic sitemap file RRS feed

  • Question

  • I have been asked to create a sitemap for our MVC 4.0, razor application that will atomically map new pages as they are added.  I have been looking around and I am now lost.  The site did not have a Web.sitemap file which I have added.  This gives me the base xml template for the site, however, this is a huge site and there are pages added and removed all the time.  I have been asked to create a way to keep this file update when pages are added and removed and it is unreasonable for a person to add and remove entries to this file manually.  I need a way to keep this file updated dynamically when pages are add/removed so it is kept update to date when we submit it to search engines.  Is there a way to add a decorator to the views that will do this?  I have searched around for a while and there seems to be ways people have done this, I just can't seem to catch hold on how to do this and I am sure I am not the only person who needs this type of functionality.  I have looked at things like MvcSiteMapProvider, but I can't get it to implement.  Anyone have any good blogs, git, or any resource that can point me in the right direction?

    The site is running system.web.mvc version 4 and razor pages.

    Thanks.

     
    Monday, September 18, 2017 5:20 PM

Answers

  • Hello katghoti ,

    According to your question is more related to Asp.NET , you could post a new thread to the Asp.Net Forum for suitable support.

    The Visual C# discuss and ask the C# programming language, IDE, libraries, samples and tools . If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution .

    Best Regards,

    feih-7


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by katghoti Thursday, September 21, 2017 2:41 PM
    Tuesday, September 19, 2017 2:26 AM