ServiceStack has not switched over to use the VirtualPathProvider
to handle static files contents.
Determining a request for a static file happens at the start of the ASP.NET request pipeline (i.e. before it reaches ServiceStack's IHttpHandler's) at a point where resolving a VirtualPathProvider
is not ideal (i.e coupling).
We're currently investigating the consequences of using a virtual path since it invalidates the physical path that's expected by the host web server.
Overriding ServiceStack's default behaviour
The first 2 hooks in ServiceStack's Order of operations allow you to inject custom logic and handle static file requests to override ServiceStack's default behavior, both are configurable in AppHost.Configure()
and in both cases you can return an IHttpHandler
if you want to hi-jack the request:
1) Config.RawHttpHandlers:
SetConfig(new EndpointHostConfig {
RawHttpHandlers = { (httpReq) => ... },
});
2) IAppHost.CatchAllHandlers:
this.CatchAllHandlers.Add((httpMethod, pathInfo, filePath) => ...);