I am currently using WebAPI running on OWIN / Katana (on an instance of the Windows Azure working role). The client (homepage with HTML, CSS and Javascript) interacts with WebAPI through the REST interface.
Static / client files such as HTML, CSS, Javascript, Images, ... will be stored in the Windows Azure Blob repository.
Now I want to use this static content through WebAPI / OWIN.
The first solution downloaded the file from the blob repository and mapped the route to the controller, which returns the blob content of this file as HttpResponse (see here )
This works fine for just one file, but my index.html contains other CSS and Javascript files. Therefore, the browser begins to search @ http://[OWIN-Web-Server-URL]/anotherJSfile.js and, of course, does not find anything, because there is no specific route for this. I cannot / do not want to determine the route for each individual file, because the client must receive files from the Blob repository without any crawls through the web server (1-2 index / initial file will be acceptable, but everything else must be done through the repository blob).
The second attempt was to use some external library that provides βstatic contentβ - functionality, but they all did not work and are in alpha state (see here or here ).
A third and not entirely acceptable solution would be to redirect from http://[OWIN-Web-Server-URL]/ to the index.html file on the blob repository. Thus, this might work, but the URL will always be something like https://xxx.blob.core.windows.net/jsscripts/index.html , which is not preferred, because if the memory name is blob ( xxx) will change, each link to the site will also break.
My question is:
Is there any solution for serving static files via Web API / OWIN? Or is there a solution in the release of Web API 2?