Exception: Unable to create type ‘XXXXXXXXXXX.MenuAdapter’


[Exception: Unable to create type ‘XXXXXXXXXXX.MenuAdapter’.]   System.Web.Configuration.HttpCapabilitiesBase.GetAdapter(Control control) +2625202   System.Web.UI.Control.ResolveAdapter() +117
System.Web.UI.Control.InitRecursive(Control namingContainer) +30
System.Web.UI.Control.InitRecursive(Control namingContainer) +279  System.Web.UI.Control.InitRecursive(Control namingContainer) +279   System.Web.UI.Control.InitRecursive(Control namingContainer) +279   System.Web.UI.Control.InitRecursive(Control namingContainer) +279   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean

We started to get this error after we applied SP2 on MOSS, while we had this error previously we were not able to reproduce it all the time.  After we applied SP2 it happened consistently and it turned out that the .browser file for our custom menu did not contain the fully qualified reference for the assembly.

.browser Before

<browsers>
  <browser refID="Default">
    <controlAdapters>
      <adapter controlType="MOSSCustomization.MossMenu"
               adapterType="MOSSCustomization.MenuAdapter" />
      <adapter controlType="MOSSCustomization.MossMenuLeft"
               adapterType="MOSSCustomization.MenuAdapterLeft" />
</controlAdapters>
  </browser>

 

.browser After

<browsers>
  <browser refID="Default">
    <controlAdapters>
      <adapter controlType="MOSSCustomization.MossMenu,MOSSCustomization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXXXXXXX"
               adapterType="MOSSCustomization.MenuAdapter,MOSSCustomization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXXXXXXX" />
      <adapter controlType="MOSSCustomization.MossMenuLeft,MOSSCustomization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXXXXXXX"
               adapterType="MOSSCustomization.MenuAdapterLeft,MOSSCustomization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXXXXXXXX" />

</controlAdapters>
  </browser>

About wesmacdonald

Wes MacDonald is a Visual Studio ALM MVP, PSD, MCT and a Principal Consultant for LIKE 10 INC., a SharePoint Server, Visual Studio and Team Foundation Server Consulting Firm providing premium support and guidance services.

One Response to “Exception: Unable to create type ‘XXXXXXXXXXX.MenuAdapter’”

  1. Thanks! Guess it solved my problem as well.. although we didn\’t have SP2 applied yet on our production environment. Problem here is that it\’s only happening on a particular WFE and simple change to the web.config (e.g. doing a app-pool recycle) also fixes it temporarliy.Robin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: