07 November, 2012

Safe Controls problem when creating custom master page SharePoint 2010

Yesterday I found out some trouble when paste my custom masterpage from my local notebook to development server on my client Tudung Group.

After pasting, however, when the code is rendered to the design pane, the SharePoint:spribbon control throws an error"The control with virtual path '_controltemplates/MUISelector.ascx' is not in the safe controls list for web at URL 'http://[server]/sites/waffles'.”

This is the figure :

After see the lines of code, I think I know what is your issue:
After copying the Starter Master page I noticed that the url is:

<%@ Register TagPrefix="wssuc" TagName="MUISelector" src="_controltemplates/MUISelector.ascx" %>

but it should be:

<%@ Register TagPrefix="wssuc" TagName="MUISelector" src="~/_controltemplates/MUISelector.ascx" %>

Please keep me updated, and make sure that the upper "Rigister" part of your Master page looks like:

<%@ Master language="C#" %>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
< %@ Import Namespace="Microsoft.SharePoint" %>
< %@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
< %@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
< %@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %>
< %@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %>
< %@ Register TagPrefix="wssuc" TagName="MUISelector" src="~/_controltemplates/MUISelector.ascx" %>
< %@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
< html xmlns="
http://www.w3.org/1999/xhtml" lang="<%$Resources:wss,language_value %>" dir="<%$Resources:wss,multipages_direction_dir_value %>" runat="server" __expr-val-dir="ltr">

Source : http://social.technet.microsoft.com/Forums/en-CA/sharepointcustomizationprevious/thread/4bdd211b-4cb0-48ac-a2c7-226c5c5e2938?prof=required

Voila!!! The result is like this :

Thank God This save my day ^.^
Rinardi Adinegara Barlim Ms SharePoint System Developer

God's partner that full of love in his life. Enjoy his life by distributed bless to another people that he meet. Now work as Microsoft SharePoint Developer :)

Tidak ada komentar :

Blog Stat