title: How do I add a user control from a separate assembly onto a Sharepoint application page?
body: <p>There is probably a very simple solution to this problem but since I do not know Sharepoint at all and cannot seem to google my way to wisdom on this one maybe one of you guys can steer me in the right direction.</p>
  
  <p>Background:
  Currently I am working in a project where a part of our web solution is constituted by Sharepoint and I have absolutely no previous experience from Sharepoint. Lately I have been struggling with what looks like a very simple task, adding a (web) user control to one of the Sharepoint pages in our solution. There are two important requirements on this task;</p>
  
  <ul>
  <li>The user control and the code-behind must lie in and make up a separate assembly</li>
  <li>That assembly must be signed</li>
  </ul>
  
  <p>The user control assembly is really another ASP.NET Web application with a Default.aspx so I may debug the user control with mockups using Cassini. When I debug it through Default.aspx it works fine, the user control is displayed and I can use it as intended.</p>
  
  <p>I have these lines in my web.config:</p>
  
  <pre><code>&lt;SafeControls&gt;
  [..]
  &lt;SafeControl Assembly="MyMainNamespace.SubNamespace.SelectorPopup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7fa78676161515a2" Namespace="MyMainNamespace.SubNamespace.SelectorPopup" TypeName=" *" Safe=" True " /&gt;
  [..]
  &lt;/SafeControl&gt;
  </code></pre>
  
  <p>And on the Sharepoint page I have put the following:</p>
  
  <pre><code>&lt;% @Register TagPrefix= "Selector" Namespace="MyMainNamespace.SubNamespace.SelectorPopup" Assembly="MyMainNamespace.SubNamespace.SelectorPopup" %&gt;
  [..]
  &lt;Selector:SelectorBoxControl runat="server" SelectorType="ContentArea" &gt;&lt;/ Selector: SelectorBoxControl&gt;
  </code></pre>
  
  <p>Our project is an ASP.NET web project on .NET 3.5 (2.0) deployed on IIS6 (Windows Server 2003) and we are using Sharepoint 2007, SQL Server 2005. Build, deploy and Visual Studio markup is fine.</p>
  
  <p>Problem:
  After deploy to our test environment the user control is not displayed at all on the Sharepoint page and I can´t figure out why.</p>
  
  <p>Build and deploy works fine and the Sharepoint page is even displayed, just that my control is nowhere to be seen. Actually, the HTML response contains absolutely no trace of my user control. Even if I put pure HTML text and no functionality in the control. There are no error messages and the event handler provides no information about possible errors or warnings.</p>
  
  <p>Am I missing something? Is there anything I need to enable, an attribute I need to add or a reference somewhere? Is there anyway I can get this non-display behavior generate an understandable error message?</p>