Medium Trust: Updating the way the controller type is obtained from metadata to avoid MEF issue under medium trust.

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-11-11 12:47:02 -08:00
parent f89e0e8d77
commit e6324ea43e

View File

@@ -36,10 +36,10 @@ namespace Orchard.Mvc {
var serviceKey = (areaName + "/" + controllerName).ToLowerInvariant();
// Now that the request container is known - try to resolve the controller information
Lazy<IController, IControllerType> info;
Lazy<Meta<IController>> info;
var workContext = requestContext.GetWorkContext();
if (TryResolve(workContext, serviceKey, out info)) {
return info.Metadata.ControllerType;
return (Type) info.Value.Metadata["ControllerType"];
}
return null;