Custom navigation provider in – Sharepoint gives shity errors – part 1

Jan 6th, 2009 | Filed under sharepoint

Did you received one of following errors in Sharepoint?

The DataSourceID of 'TopNavigationMenu' must be the ID of a control of type IHierarchicalDataSource. A control with ID 'topSiteMap' could not be found.


Exception message: The DataSourceID of 'QuickLaunchMenu' must be the ID of a control of type IHierarchicalDataSource.  A control with ID 'QuickLaunchSiteMap' could not be found.

As You propably already find out.. this error is very likely to have  nothing in common with masterpages or layouts..

In my case error occured immediately after adding my custom navigation provider to web.config (without even using it!)

What was wrong? Assembly in which was provider was signed and I was not using full assembly string in web.config. Argh.. sometimes I hate sharepoint..

(beside that SafeControl entry is of course also needed)

If above solution does not work in your case try googling more.. a couple of other things causes above errors to appear.

  1. paisleygo
    Mar 17th, 2009 at 20:50
    Reply | Quote | #1

    Hey – don’t blame your bad web.config editing on sharepoint!

    I too ran into this – and it is not really specific to not having that particular safecontrol entry
    – but however badly formed xml in the web.config

    today I am not hating sharepoint too badly (I have definitley been there though)

  2. admin
    Mar 17th, 2009 at 21:18
    Reply | Quote | #2

    I had safecontrol entry.
    I didn’t use full Assembly String for my navigation provider (in web.config)

    Nevertheless If class, method or object cannot be found, have illegal value or whatever I would expect more meaningfull error messages…

    Moreover.. that kind of error can be obtain from many other reasons. For me it’s a proof that exceptions handling in Sharepoint is rather poor…

    What would you do without dozens of blogs that describes such strange cases?

  3. paisleygo
    Jul 7th, 2009 at 17:31
    Reply | Quote | #3

    I’m having this exception right now and this error message is excrutiating.

    I hate when dudes when like paisleygo make excuses for the shortcomings of SharePoint. This message leads me nowhere.

  4. admin
    Jun 1st, 2011 at 12:18
    Reply | Quote | #4

    I hit this error once again in SP2010 which still has shity error messages.
    This time helped adding
    NavigationType=”Current” EncodeOutput=”false”
    to web.config in navigation provider definition.

  5. Ofer Gal
    Sep 17th, 2012 at 18:52
    Reply | Quote | #5

    What if I have no navigation provider at all?
    What need I take out of web.config?

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image