This project has moved and is read-only. For the latest updates, please go here.

Static File Magic

Jun 22, 2013 at 3:17 AM
What's the simplest way to host an index.html and a Scripts folder off of the root of the site using the StaticFiles middleware? I've tried a few things, some work, some don't. Hosting in an Azure Worker Role changes the folder structure some, so I'd like something that's somewhat reliable.
Jun 22, 2013 at 6:27 PM
Can you specify what you've tried and what issues you saw?
Jul 1, 2013 at 8:00 PM
I've tried your samples, and those work.

I cannot seem to reliably get UseStaticFiles without specifying the correct folder path.

I have not had any luck with any form of UseFileServer. I've not found any combination of options that work, even when trying to use a similar setup as that found in the samples.

I would like to be able to host a normal site with an index.html in the root that is selected as the default document. I'd also like to be able to host this locally and in an Azure Worker Role. The latter uses a different path than the path used when running locally, so it's not easy to determine how to correctly set the path.