I recently tried adding a page to WSS 3.0 which utilized one of the ASP.NET AJAX components and received the error "Error - this control is not registered as a safe control." After some digging, I found out that you have take a few steps to get these AJAX control extenders to work in Sharepoint.
- AjaxControlToolkit.dll - Put this in your /Bin directory
- Add an assembly reference in the web.config (note: for the future versions of the Control Tookit, the version number can change. Right-click on the dll and go to properties to find the dll verison):
<assemblies>
...
<add assembly="AjaxControlToolkit, Version=1.0.10920.32880, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
....
</assemblies>
- Add the tagprefix for the Control Toolkit in the web.config:
<controls>
...
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
....
</controls>
-
Register the assembly as a safe control:
<SafeControls>
<SafeControl Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />
<SafeControl Assembly="AjaxControlToolkit, Version=1.0.10920.32880, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" Namespace="AjaxControlToolkit" TypeName="*" Safe="True" />
</SafeControls>
That's it. You can now start using all of those control AJAX extenders in Sharepoint