SharePoint Specified cast is not valid

SharePoint pages were not loading on one server in our farm after doing a registry updated.

http://msdn.microsoft.com/en-us/library/aa973248.aspx

Turned out that a Key value was incorrectly set. Once the Key value was fixed, pages started loading.

Server Error in ‘/’ Application.
——————————————————————————–

Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Specified cast is not valid.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Specified cast is not valid.]
Microsoft.SharePoint.SPRequestManager.get_SPRequestsPerThreadWarning() +26657440
Microsoft.SharePoint.SPRequestManager.Add(SPRequest request, Boolean shareable) +340
Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) +27989305
Microsoft.SharePoint.SPRequestManager.GetContextRequest(SPRequestAuthenticationMode authenticationMode) +268
Microsoft.SharePoint.Administration.SPFarm.get_RequestAny() +173
Microsoft.SharePoint.SPRegionalSettings.get_GlobalInstalledLanguages() +27
Microsoft.SharePoint.Administration.SPTemplateFileSystemWatcher.RefreshInstalledLocales() +60
Microsoft.SharePoint.Administration.SPTemplateFileSystemWatcher.Initialize() +69
Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.System.Web.IHttpModule.Init(HttpApplication app) +931
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +480
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382

[HttpException (0x80004005): Specified cast is not valid.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11335878
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4355300

——————————————————————————–
Version Information: Microsoft .NET Framework Version:2.0.50727.5472; ASP.NET Version:2.0.50727.5456