Create a virtual path provider for WebForms files

This is so that we dynamically add the relevant <%@ Assembly Name="" %>
directive to WebForms files served from modules which have been dynamically
compiled and stored in the "~/App_Data/Dependencies" folder.

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-06-04 22:28:01 -07:00
parent 2be308bbf6
commit 1efde731fe
4 changed files with 133 additions and 4 deletions

View File

@@ -3,13 +3,12 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Hosting;
using System.Web.Mvc;
using System.Web.Routing;
using Autofac;
using Autofac.Builder;
using Autofac.Integration.Web;
using Autofac.Integration.Web.Mvc;
using Orchard.Environment;
using Orchard.Environment.Extensions.Loaders;
namespace Orchard.Web {
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
@@ -32,6 +31,7 @@ namespace Orchard.Web {
RegisterRoutes(RouteTable.Routes);
HostingEnvironment.RegisterVirtualPathProvider(new WebFormsExtensionsVirtualPathProvider());
_host = OrchardStarter.CreateHost(MvcSingletons);
_host.Initialize();
@@ -101,6 +101,5 @@ namespace Orchard.Web {
builder.RegisterInstance(ModelMetadataProviders.Current);
builder.RegisterInstance(ViewEngines.Engines);
}
}
}