As an aside to those that stumble along across this, one nice way to run test level on using the HostingEnvironment call, is if accessing say a UNC share: \example\ that is mapped to ~/example/ you could execute this to get around IIS-Express issues:
#if DEBUG
var fs = new FileStream(@"\\example\file",FileMode.Open, FileAccess.Read);
#else
var fs = new FileStream(HostingEnvironment.MapPath("~/example/file"), FileMode.Open, FileAccess.Read);
#endif
I find that helpful in case you have rights to locally test on a file, but need the env mapping once in production.