I'm currently using WebAPI running on OWIN/Katana (on a Windows Azure worker role instance). The client (homepage build with HTML, CSS & Javascript) interacts with the WebAPI via the REST interface.
Static/client related files like the HTML, CSS, Javascript, Images, ... will be saved on Windows Azure Blob Storage.
I now want to serve this static content via WebAPI/OWIN.
First solution was loading the file from blob storage and map a route to a controller which return the blob content of this file as HttpResponse (see here)
This works fine for just one file, but my index.html includes other CSS and Javascript files. So the browser starts looking @ http://[OWIN-Web-Server-URL]/anotherJSfile.js and of course finds nothing because there is no route defined for this. I can't/don't want to define a route for every single file, because the client should get the files from the Blob Storage without any detours over the Web Server (1-2 index/start file would be acceptable, but everything else should be served via blob storage).
Second attempt was to use some external library which provides a "static content"- functionality, but they all didn't work and are in alpha state (see here or here).
Third and not quite acceptable solution would be to redirect from http://[OWIN-Web-Server-URL]/ to the index.html file on the blob storage. This way it might work, but URL would always be something like https://xxx.blob.core.windows.net/jsscripts/index.html, which is not preferable, because if the blob storage name (xxx) would change, every link to the site would also break.
My question is:
Is there currently any solution for serving static files via Web API/OWIN? Or is there any solution in the upcoming Web API 2 release?