0

I have defined custom route for sitemap like this

            routes.MapRoute(
                   name: "sitemap",
                   url: "sitemap.xml",
                   defaults: new { controller = "seo", action = "sitemap" }
                   );

In this scenario the when i request the url domain.com/sitemap.xml it should be routed to the seo controller and the sitemap action then i will get the required data dynamically and generate an sitemap.xml file and that will get served here every thing is working fine , but the problem is when i request the url for second time its not getting routed to the controller and the same old content is rendered i think the IIS is serving as a static file can any one help me in overcome this issue

SoftwareNerd
  • 1,875
  • 8
  • 29
  • 58
  • I suspect the browser is caching it. Try the solution in the accepted answer at http://stackoverflow.com/questions/860678/how-can-i-disable-client-side-and-proxy-caching-in-asp-net-mvc – Andy Nichols Oct 27 '14 at 11:31
  • How is your runAllManagedModulesForAllRequests config in web.config? – Luizgrs Oct 27 '14 at 11:33

0 Answers0