This project is read-only.

Serving static files from Orchard module

Topics: General
Nov 17, 2015 at 1:35 PM

I have an ASP.NET MVC web site that is mostly static .html pages. This works fine on its own with the standard ASP.NET MVC web.config and routing, but I am now trying to convert the site into an Orchard module as described in

I have enabled the site as a module, but when I try to navigate to /MyModule/testpage.html I get a 404 error. I assume this is something to do with the way Orchard is intercepting the routes but I can't work out what. Would anyone be able to advise please?

Nov 25, 2015 at 12:29 AM
Check this discussion for help. It may merely be a matter of enabling your module's web.config to serve static html pages.
Nov 26, 2015 at 11:28 AM
Thanks for that, but I still can't get it working. I tried adding a basic HelloWorld module as described in and then making the web.config change but it doesn't serve my html file, it just gives a 404. I don't understand what I could be doing wrong.