How to serve html static pages?

I’ve forgot it , remember something about the FileSystemVirtualPathProvider (but it seems deprecated?)
I want calling a route from serviceStack to display html pages.

The FilesSystem VFS was deprecated and renamed to FileSystemVirtualFiles long ago.

But if you just want to return a static file you can just request the file directly, which gets handled by the built-in Static File Handler. If you want to return the file without .html extension you can register the SharpPagesFeature plugin.

For more flexibility you can return a file or view within a Service.

1 Like