From e6324ea43e7841dc2409896692c388dda7c07ef8 Mon Sep 17 00:00:00 2001 From: Andre Rodrigues Date: Thu, 11 Nov 2010 12:47:02 -0800 Subject: [PATCH] Medium Trust: Updating the way the controller type is obtained from metadata to avoid MEF issue under medium trust. --HG-- branch : dev --- src/Orchard/Mvc/OrchardControllerFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orchard/Mvc/OrchardControllerFactory.cs b/src/Orchard/Mvc/OrchardControllerFactory.cs index 929cdf5fb..f4596c66b 100644 --- a/src/Orchard/Mvc/OrchardControllerFactory.cs +++ b/src/Orchard/Mvc/OrchardControllerFactory.cs @@ -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 info; + Lazy> info; var workContext = requestContext.GetWorkContext(); if (TryResolve(workContext, serviceKey, out info)) { - return info.Metadata.ControllerType; + return (Type) info.Value.Metadata["ControllerType"]; } return null;