A quick solution to this problem is to add the following to the "AssemblyInfo.cs" file of the AJAX Control Toolkit project (not your own web application project):
[assembly: SecurityRules(SecurityRuleSet.Level1)]
Of course, at the beginning of this file, make sure that you have
using System.Security;
After you have made these changes, rebuild the AJAX Control Toolkit, and then your web application. Your web application should build fine.
Update: A later build of AJAX Control Toolkit now works with Visual Studio 2010 without modification.