1

Closed

Time zone and Registry access

description

I encountered an issue in that, registry access for time zone handling causes security exceptions.

Here is the main message:

"Requested registry access is not allowed."

The top of the stack trace is:

at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.InternalOpenSubKey(String name, RegistryKeyPermissionCheck permissionCheck, Int32 rights)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)
at System.TimeZoneInfo.TryGetTimeZoneByRegistryKey(String id, TimeZoneInfo& value, Exception& e)
at System.TimeZoneInfo.TryGetTimeZone(String id, Boolean dstDisabled, TimeZoneInfo& value, Exception& e, CachedData cachedData)
at System.TimeZoneInfo.GetLocalTimeZone(CachedData cachedData)
at System.TimeZoneInfo.CachedData.CreateLocal()
at System.TimeZoneInfo.get_Local()
at Newtonsoft.Json.Utilities.DateTimeUtils.GetUtcOffset(DateTime d)
Closed Feb 1, 2013 at 8:05 AM by JamesNK
That's not a Json.NET error. I did find this in Google which might help you - http://stackoverflow.com/questions/4692644/asp-net-site-throwing-a-system-security-securityexception

comments