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....
What could 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)?
Finally I have used the two pieces of advice I have received. 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>
You should modify your web.config, adding your assembly to the list of assemblies:
<system.web>
<compilation>
<assemblies>
<add assembly="*<Your assembly name here>*"/>
</assemblies>
</compilation>
</system.web>
Add the assembly that contains your controls, and the error should disappear. For future reference, Temp internet files has almost nothing to do with Asp.net errors. Though you can clear them if it makes you feel better.