#19893: Mime types are not read from the local web.config

Work Item: 19893

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros 2013-07-13 16:23:00 -07:00
parent 4d576e9ef0
commit 6e7249f257

View File

@ -29,8 +29,9 @@ namespace Orchard.FileSystems.Media {
return _cacheManager.Get(extension, ctx => {
try {
try {
string applicationHost = System.Environment.ExpandEnvironmentVariables(@"%windir%\system32\inetsrv\config\applicationHost.config");
string webConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(null).FilePath;
string webConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~").FilePath;
// search for custom mime types in web.config and applicationhost.config
foreach (var configFile in new[] { webConfig, applicationHost }) {