Note that there are some explanatory texts on larger screens.

plurals
  1. POException creating type for an adapter in a Sharepoint website?
    text
    copied!<p>I have a website in Sharepoint 2007. I use control adapters, specifically an adapter for the menu and the login control. These two adapters resides in a signed assembly that it is deployed to the bin folder of the website. The browser </p> <pre><code>&lt;browser refID="Default"&gt; &lt;controlAdapters&gt; &lt;adapter controlType="System.Web.UI.WebControls.Menu" adapterType="NameofEnterprise.SecondName.Adapters.MenuAdapter" /&gt; &lt;adapter controlType="System.Web.UI.WebControls.Login" adapterType="NameofEnterprise.SecondName.Adapters.LoginAdapter" /&gt; &lt;/controlAdapters&gt; &lt;/browser&gt; </code></pre> <p>From time to time I get the following exception, just from time to time, let's say once or twice a day:</p> <pre><code>Unable to create type 'NameofEnterprise.SecondName.Adapters.MenuAdapter'. </code></pre> <p>Things to take in mind: this happens in the machine I develop, I don't know if there are temporary files that can get the framework crazy. Second, I don't know if the framework perhaps is looking for the class of the Adapter in another assembly, as I have some assemblies that have the same namespaces as this one, that is to say: NameofEnterprise.SecondName.BusinessLayer,NameofEnterprise.SecondName.DataLayer....</p> <p>Plz could you tell me what can be the problem? Can I be more specific to tell the framework the name of the assembly (in the browser you only write the name of the class and namespace)?</p> <p><strong>SOLUTION</strong></p> <p>Finally i have used the 2 advices you have given me. I think that with the first thing is enough, that is to say:</p> <pre><code>&lt;system.web&gt; &lt;compilation&gt; &lt;assemblies&gt; &lt;add assembly="*&lt;Your assembly name here&gt;*"/&gt; &lt;/assemblies&gt; &lt;/compilation&gt; &lt;/system.web&gt; </code></pre> <p>But i have included two the assembly and public token in the browser:</p> <pre><code>&lt;browser refID="Default"&gt; &lt;controlAdapters&gt; &lt;adapter controlType="System.Web.UI.WebControls.Menu" adapterType="NameofEnterprise.SecondName.Adapters.MenuAdapter", YourAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=YourPublicKeyToken"/&gt; &lt;/controlAdapters&gt; </code></pre>
 

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