title: ASP.NET page or control marked as internal doesn't work and gives "inaccessible due to its protection level" error
body: <p>I know why this happens and I want to find a workaround it. </p>
  
  <p>Example: a user control that exist in 2 assemblies, loaded at the same time.</p>
  
  <pre><code>namespace MyNamespace
  {
      internal class MyUserControl : UserControl
      {
      }
  }
  </code></pre>
  
  <p>My situation - I want to be able to share <strong>user interface control</strong> between two web applications which are loaded at the <strong>same time</strong> in the <strong>same application pool</strong>. If my user interface class is marked <code>public</code>, then ASP.NET will not like it because it will be duplicated into memory ( CLR uses namespaces as full qualifier for class, and if the same class and namespace is met it more than one assembly, exception is thrown ). I do then mark the class as internal and of course I forget how UI compilation occurs, and I expect it to work. Of course it doesn't because ASP.NET compiles the UI into separate assembly which is dynamic and since I marked the class as internal, it is not visible to the main assembly...</p>
  
  <p>The question that follows is: How can I make dynamic compiled assemblies that ASP.NET generates to view the main application assembly internals? It is very unfortunate that classes and methods I write into my UI controls must always be public! Has anyone met this obstacle in his daily work and found a workaround?</p>
  
  <p>EDIT:</p>
  
  <p>Precompilation is not possible here due to other circumstances.</p>