Browse Source

consider MachineKeyRegistryStorage is not supported in TARGET_J2EE

svn path=/trunk/mcs/; revision=85184
Igor Zelmanovich 18 years ago
parent
commit
3290f18a2e

+ 4 - 0
mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeySection.cs

@@ -123,10 +123,14 @@ namespace System.Web.Configuration {
 
 		static void AutoGenKeys ()
 		{
+#if TARGET_J2EE
+			{
+#else
 			try {
 				autogenerated = MachineKeyRegistryStorage.Retrieve (MachineKeyRegistryStorage.KeyType.Validation);
 				autogenerated_decrypt = MachineKeyRegistryStorage.Retrieve (MachineKeyRegistryStorage.KeyType.Encryption);
 			} catch (Exception) {
+#endif
 				// Fall back to old method
 				autogenerated = new byte [64];
 				RandomNumberGenerator rng = RandomNumberGenerator.Create ();