Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

My Sharepoint site is using a custom Masterpage.

I get an error just checking out, and saving the Masterpage without doing any changes.

When I open the masterpage in sharepoint designer, and try to save it, I get the usual "Site Definition Page Warning" about "Saving your changes will customize this page so that it it no longer based on the site definition".

When I press Yes, and try to access the site; I get an error about

"The control type 'bla.bla.Helpers.CSSLinkControl2010' is not allowed on this page. The type is not registered as safe."

How is it possible to get an error just by checking out and saving (without doing changes).

I also get the same error when I make a new custom masterpage and uploads it.

share|improve this question
3  
Are you using Foundation or Server? Basically it is telling you that there is a control on the master page that has not been registered in the web.config file as a safe control. So it depends on what version of SharePoint you are running and also where that control is coming from. –  spevilgenius Apr 22 '13 at 11:49
    
Thanks, I'll look at that. Strange that the masterpage is working as it is, but once I edit it, it gets broken tho right? –  williamwmy Apr 22 '13 at 11:52
    
As a test, you could use the starter master pages from codeplex. If you can save a clean starter page without error then that should help prove SharePoint is working correctly. It will also validate that something on the master page is not registered correctly which may or may not mean a reinstall. –  spevilgenius Apr 22 '13 at 11:55
add comment

2 Answers

As the SpEvilGenius already sugested the actual master page is referencing some custom control which was most likely deployed in the original location (some assemblies for sure deployed on the original farm) and no longer appears in the SafeControls section of the web.config.

If that master page was copied from somewhere, make sure you validate all Registration tags (references to assemblies are usually declared on top), and if they are not of SharePoint's origins, either deploy the binaries or remove them alltogether.

Sometimes, even a Prefix is present for some controls, similar to how Sharepoint/ASP.NET controls are declared in design-time on the page. After you locate the foreign Registration tag, use TagPrefix to search for the actual control in the master page and remove it (if you don't have the original deployment package).

share|improve this answer
add comment
up vote 0 down vote accepted

After som research I found that someone has retracted the solution fromt he web app, that made the safe controls does not appear in web.config anymore (but for some reason the web app still works fine).

And since the solution is not deployed to the web app anymore, but the master page is still has reference to it, it complains and give me an error because of the lack of safe control settings on web.config.

The solution was to simply deploy the solution to the web app so that safe control settings on web.config gets updated.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.