Note that there are some explanatory texts on larger screens.

plurals
  1. POASPX Page Compilation Fails
    primarykey
    data
    text
    <p>We’re developing a web-based application that allows administrators to upload plug-ins. All plug-ins are stored in a special folder outside the app root (say, C:\Plugins) and are dynamically loaded via Assembly.LoadFrom(). This works just fine for the most part: WebControls in the plug-ins are instantiated and loaded, custom classes function as expected, etc.</p> <p>We’re using a custom VirtualPathProvider to get resources out of these plug-ins. So, to get an embedded ASPX file, you’d simply do like, “/MySite/embeddedResource/?Assembly=MyPlugin&amp;Resource=MyPage.aspx”. And that works fine, too: the embedded ASPX file compiles and is served up like a normal page. </p> <p>The problem, however, comes in when an embedded .aspx file (inside of a dynamically loaded plugin) references a class inside that same plug-in assembly. We get compilation errors like, “cannot find type or assembly MyPlugin.” This is odd because, clearly, it’s pulling the .aspx file out of MyPlugin; so how can it not find it?</p> <p>So, I’m hoping you can help me out with this. The plugin would look like this:</p> <p>MyPlugin.dll:</p> <ul> <li>InternalHelperClass.cs</li> <li>MyPage.aspx (resource with no .cs file)</li> </ul> <p>When MyPage.aspx contains something like, “&lt;%= InternalHelperClass.WriteHelloWorld() %>”, the compilation fails. </p> <p>How can we get this to work?</p> <p><strong>UPDATE:</strong></p> <p>We have tried using fully qualified names. No difference. It is impossible to step through - it is a compilation error when you go to the aspx page. Namespaces would not be an issue in this case (since it was from an external plugin dll)</p> <p><strong>UPDATE2:</strong></p> <p>Joel, I think you are onto something. Unfortunately, editing the web.config to include these assemblies isn't part of the design. Basically, we want the plugins to be completely dynamic - drop them in a folder, restart the app, and be ready to go.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload