There's a minor bug in .NET 4 that causes problems when loading pages with a ScriptManager on the page. Within the System.Web.Extensions dll, in the System.Web.UI.AssemblyCache class, the method "GetAjaxFrameworkAssemblyAttribute" enumerates all the custom attributes in a given assembly. If, for some reason, one of those attributes is unavailable, this method fails and the application crashes.
See this search for a number of people running into the same problem:
The solution would be to simply wrap the call to GetCustomAttributes() in a try...catch block; if there's a problem getting an attribute for an unrelated DLL, it should not cause the application to crash.
Also, see this thread: http://groups.google.com/group/websync/browse_thread/thread/83c1f88abbb00b80?pli=1