I use VirtualPathProvider to enable usercontrols that are not available at compile time. Everything works correctly, with the exception of a DLL link that actually contains the control.
When a page with the specified control is called, it cannot find the type of control unless I put the dll in the bin folder.
Error: Error Parser Description. An error occurred while analyzing the resource needed to service this request. Review the following parsing details and modify the source file accordingly.
Parser error message: Failed to load type 'App.Modules.ModuleA.Controls.Entity1Item'.
Source Error:
Line 1: <% @ Control language = "C #" AutoEventWireup = "true" CodeBehind = "Entity1Item.ascx.cs" Inherits = "App.Modules.ModuleA.Controls.Entity1Item"%>
I tried to handle all the significant AppDomain events (AssemblyResolve, TypeResolve and ReflectionOnlyAssemblyResolve), but no one called my type.
I saw in the TypeResolve documentation that this is called whenever Type.GetType is executed and the type is not found. ASCX doesn't seem to fire an event when it needs its type ... why?
Thanks! Alex
source share