tags:

views:

234

answers:

1

Hi,

I have customized SharePoint master page Navigation menu by adding asp:XmlDataSource but I am getting "The control type 'System.Web.UI.WebControls.XmlDataSource' is not allowed on this page. The type is not registered as safe." Error.
I really appreciate any help.

+2  A: 

You have to add the assembly as a safe control assembly in your web.config file.

<configuration>
  <SharePoint>
    <SafeControls>
      <SafeControl Assembly="[Assembly Name]" Namespace="[Namespace]" TypeName="*" Safe="True" />
    </SafeControls>
  </SharePoint>
</configuration>

In your case it will be:

<SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="XmlDataSource" Safe="False" AllowRemoteDesigner="False" />
Magnus Johansson