From 01da4f78f4a0ad6b6a93d6130e40061a50b30b5d Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Mon, 22 Jul 2024 09:49:37 -0700 Subject: [PATCH] Remove dead code for NetFx ASP.NET (#105115) Co-authored-by: Stephen Toub --- .../Configuration/SettingsPropertyValue.cs | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyValue.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyValue.cs index 84145a4c50863..894ca9122b9dd 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyValue.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyValue.cs @@ -75,12 +75,6 @@ public object SerializedValue } } - private static bool IsHostedInAspnet() - { - // See System.Web.Hosting.ApplicationManager::PopulateDomainBindings - return AppDomain.CurrentDomain.GetData(".appDomain") != null; - } - private object Deserialize() { object value = null; @@ -112,25 +106,8 @@ private object Deserialize() } } } - catch (Exception exception) + catch (Exception) { - try - { - if (IsHostedInAspnet()) - { - object[] args = new object[] { Property, this, exception }; - - const string webBaseEventTypeName = "System.Web.Management.WebBaseEvent, System.Web"; - Type type = Type.GetType(webBaseEventTypeName, true); - - type.InvokeMember("RaisePropertyDeserializationWebErrorEvent", - BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.InvokeMethod, - null, null, args, CultureInfo.InvariantCulture); - } - } - catch - { - } } if (throwBinaryFormatterDeprecationException)