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
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu"
adapterType="NameofEnterprise.SecondName.Adapters.MenuAdapter" />
<adapter controlType="System.Web.UI.WebControls.Login"
adapterType="NameofEnterprise.SecondName.Adapters.LoginAdapter" />
</controlAdapters>
</browser>
From time to time I get the following exception, just from time to time, let's say once or twice a day:
Unable to create type 'NameofEnterprise.SecondName.Adapters.MenuAdapter'.
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....
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)?
SOLUTION
Finally i have used the 2 advices you have given me. I think that with the first thing is enough, that is to say:
<system.web>
<compilation>
<assemblies>
<add assembly="*<Your assembly name here>*"/>
</assemblies>
</compilation>
</system.web>
But i have included two the assembly and public token in the browser:
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu"
adapterType="NameofEnterprise.SecondName.Adapters.MenuAdapter", YourAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=YourPublicKeyToken"/>
</controlAdapters>