views:

378

answers:

1

Hi all:

I've been getting an error in SharePoint that reads:

System.Web.UI.ScriptManager is not allwoed on this page. The type is not registered as safe.

I googled around, and the results pointed to missing AJAX server extension installations while using the asp:scriptManager tag. However upon closer inspection of my project, there was no findings of such tag. Whats even more strange, was that after I reinstall/reset the masterpage, the error went away and I was able to read my site again.

I was wondering whether the above error would appear if certain SharePoint files gets overriden? Or are there other less obvious/non-trivial reasons for it?

Thanks.

A: 

When it comes to the error, it is very likely related to your custom masterpage is not including the tag itself but it has a control or code that requires and/or inserts the tag.

Example: it is a common practice to code a custom webpart or usercontrol in order to insert the ScriptManager under the forms tag programatically in case one isn't present, and once this custom code hooks the page render with the ScriptManager, it will check for whether it is allowed in web.config -- thus you get the error.

SharePoint's web.config does not comes with Ajax enabled. Telerik has a good tutorial on that.

F.Aquino
@F.Aquino: I'm a bit confused. After creating a site, the error occured, but the site itself was actually generated. I reinstalled the master pages, then things become fine. So if the error is on the master page, it would sound a bit weird that reinstalling the pages would fix things. I was thinking that there might be something in the client side code that resets the master page files to their original states, but I don't know enough about Sharepoint to say this is the problem.
BeraCim
I thought that by 'reinstalling' the masterpage you meant to reset them, thus, freeing them from any customization.
F.Aquino
The site was set to a custom page. Upon first load, the site returned the above error. I then went to site settings > master pages and set the site master page to something else first, click okay, then set it back to the custom page. That way fixed the error. What I was confused with is what sort of things would be reset to the custom page by doing this?
BeraCim