System\Configuration\BaseConfigurationRecord.cs (82)
525ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, streamname, 0),
594ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e,
600ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e,
738ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e,
1356SR.Format(SR.Config_exception_creating_section, factoryRecord.ConfigKey),
1374throw new ConfigurationErrorsException(SR.Config_file_has_changed,
1499SR.Format(SR.Config_cannot_open_config_source, sectionXmlInfo.ConfigSource),
1506throw new ConfigurationErrorsException(SR.Config_source_file_format, xmlUtil);
1515throw new ConfigurationErrorsException(SR.Protection_provider_syntax_error, xmlUtil);
1530throw new ConfigurationErrorsException(SR.Config_source_file_format, xmlUtil);
1588throw ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, filename,
1601throw new ConfigurationErrorsException(SR.Format(SR.ProtectedConfigurationProvider_not_found,
1629throw new ConfigurationErrorsException(SR.Config_object_is_null, filename, line);
1638SR.Format(SR.Config_exception_creating_section_handler, factoryRecord.ConfigKey), e, filename,
1740SR.Format(SR.Config_exception_creating_section_handler, factoryRecord.ConfigKey), e,
1759SR.Format(SR.Config_file_doesnt_have_root_configuration, xmlUtil.Filename), xmlUtil);
1776SR.Format(SR.Config_namespace_invalid, xmlUtil.Reader.Value, ConfigurationNamespace),
1866new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined_at_this_level, tagName), xmlUtil),
1882new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, tagName), xmlUtil),
2003SR.Format(SR.Config_tag_name_already_defined_at_this_level, tagName),
2021SR.Format(SR.Config_tag_name_already_defined, tagName), xmlUtil),
2030new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, tagName), xmlUtil),
2119SR.Config_section_allow_exe_definition_attribute_invalid,
2131SR.Config_section_allow_definition_attribute_invalid,
2355new ConfigurationErrorsException(SR.Format(SR.Config_client_config_too_many_configsections_elements, tagName), xmlUtil),
2364new ConfigurationErrorsException(SR.Config_location_location_not_allowed, xmlUtil),
2397SR.Format(SR.Config_unrecognized_configuration_section, configKey), xmlUtil),
2473SR.Config_section_cannot_be_used_in_location, xmlUtil),
2488SR.Config_sections_must_be_unique, xmlUtil),
2510new ConfigurationErrorsException(SR.Config_section_locked, xmlUtil),
2535new ConfigurationErrorsException(SR.Config_source_syntax_error, xmlUtil),
2558SR.Protection_provider_syntax_error, xmlUtil),
2580new ConfigurationErrorsException(SR.Config_source_syntax_error, xmlUtil),
2605throw ExceptionUtil.WrapAsConfigException(SR.Config_source_invalid, e, xmlUtil);
2723new ConfigurationErrorsException(SR.Invalid_override_mode_declaration, xmlUtil),
2742new ConfigurationErrorsException(SR.Invalid_override_mode_declaration,
2782SR.Location_invalid_inheritInChildApplications_in_machine_or_root_web_config,
2907SR.Config_sections_must_be_unique,
2913SR.Config_sections_must_be_unique,
2980SR.Config_section_locked,
3028throw new ConfigurationErrorsException(SR.Config_tag_name_invalid, errorInfo);
3041throw ExceptionUtil.WrapAsConfigException(SR.Config_tag_name_invalid, e, errorInfo);
3053SR.Format(SR.Cannot_declare_or_remove_implicit_section, name), errorInfo);
3057throw new ConfigurationErrorsException(SR.Config_tag_name_cannot_begin_with_config, errorInfo);
3060throw new ConfigurationErrorsException(SR.Config_tag_name_cannot_be_location, errorInfo);
3082throw new ConfigurationErrorsException(SR.Config_location_path_invalid_first_character, errorInfo);
3086throw new ConfigurationErrorsException(SR.Config_location_path_invalid_first_character, errorInfo);
3092throw new ConfigurationErrorsException(SR.Config_location_path_invalid_last_character, errorInfo);
3096throw new ConfigurationErrorsException(SR.Config_location_path_invalid_last_character, errorInfo);
3100throw new ConfigurationErrorsException(SR.Config_location_path_invalid_character, errorInfo);
3199throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo);
3203throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo);
3206throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo);
3212throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo);
3229throw new ConfigurationErrorsException(SR.Format(SR.Config_source_cannot_be_shared,
3316SR.Format(SR.Config_source_cannot_be_shared, configSourceArg),
3342SR.Format(SR.Config_source_parent_conflict, configSourceArg),
3558throw new ConfigurationErrorsException(SR.Protection_provider_invalid_format, errorInfo);
3579throw new ConfigurationErrorsException(SR.EncryptedNode_not_found, filename, lineNumber);
3595throw new ConfigurationErrorsException(SR.EncryptedNode_not_found, filename, lineNumber);
3600throw new ConfigurationErrorsException(SR.EncryptedNode_is_in_invalid_format, filename, lineNumber);
3617SR.Format(SR.Decryption_failed, protectionProvider.Name, e.Message), e, filename, lineNumber);
3630throw new ConfigurationErrorsException(SR.EncryptedNode_is_in_invalid_format, filename, lineNumber);
System\Configuration\ConfigurationElement.cs (55)
109throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, LockItemKey));
213throw new ConfigurationErrorsException(SR.Config_element_no_context);
397SR.Format(SR.Config_base_attribute_locked, propInfo.Name));
523throw new ConfigurationErrorsException(SR.Format(SR.Config_base_element_locked, elementName),
802SR.Format(SR.Validator_does_not_support_elem_type, type.Name));
829if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only);
838throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, prop.Name));
1081throw new ConfigurationErrorsException(SR.Format(
1082SR.Config_base_required_attribute_locked, prop.Name));
1171SR.Format(SR.Config_base_element_cannot_have_multiple_child_elements, prop.Name));
1256format = value != null ? SR.Config_base_invalid_element_to_lock : SR.Config_base_invalid_element_to_lock_by_add;
1260format = value != null ? SR.Config_base_invalid_attribute_to_lock : SR.Config_base_invalid_attribute_to_lock_by_add;
1266SR.Format(format, attribToLockTrim, sb),
1270throw new ConfigurationErrorsException(SR.Format(format,
1286throw new ConfigurationErrorsException(SR.Format(SR.Empty_attribute, LockAttributesKey),
1289throw new ConfigurationErrorsException(SR.Format(SR.Empty_attribute, LockElementsKey),
1293SR.Format(SR.Config_empty_lock_attributes_except, LockAllAttributesExceptKey,
1297SR.Format(SR.Config_empty_lock_element_except, LockAllElementsExceptKey, LockElementsKey),
1353SR.Format(SR.Config_base_required_attribute_lock_attempt, propToLock.Name));
1413throw new ConfigurationErrorsException(SR.Format(SR.Config_base_element_locked, reader.Name), reader);
1430SR.Format(SR.Config_base_attribute_locked, propertyName), reader);
1440SR.Format(SR.Config_base_unrecognized_attribute, propertyName), reader);
1461SR.Format(SR.Config_invalid_boolean_attribute, propertyName), reader);
1485SR.Format(SR.Config_base_unrecognized_attribute, propertyName),
1518SR.Format(SR.Config_base_element_cannot_have_multiple_child_elements,
1533SR.Format(SR.Config_base_property_is_not_a_configuration_element,
1546SR.Format(SR.Config_base_unrecognized_element_name, propertyName), reader);
1558SR.Config_base_section_invalid_content, reader);
1764throw new ConfigurationErrorsException(SR.Format(SR.Validator_does_not_support_elem_type,
1780throw new ConfigurationErrorsException(SR.Format(SR.Validator_element_not_valid, elem.ElementTagName,
1833throw new ConfigurationErrorsException(SR.Format(SR.Config_base_required_attribute_missing, name),
System\Configuration\ConfigurationElementCollection.cs (64)
51throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultAddItemName, value));
61throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultRemoveItemName, value));
72throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultClearItemsName, value));
82if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only);
507if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only);
510throw new ConfigurationErrorsException(SR.Format(SR.Config_base_element_locked, _addElement));
520throw new ConfigurationErrorsException(SR.Config_base_collection_item_locked);
527SR.Format(SR.Config_base_collection_entry_already_exists, key),
619if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only);
628throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, ElementName));
648throw new ConfigurationErrorsException(SR.Config_base_cannot_add_items_below_inherited_items);
655throw new ConfigurationErrorsException(SR.Config_base_cannot_add_items_above_inherited_items);
664throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index));
682if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only);
683if (index < -1) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index));
714SR.Format(SR.Config_base_collection_entry_already_exists, key),
733throw new ConfigurationErrorsException(SR.Config_base_read_only);
745SR.Format(SR.Config_base_collection_entry_not_found, key));
751throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, key));
767SR.Config_base_cannot_remove_inherited_items);
775SR.Config_base_cannot_remove_inherited_items);
790throw new ConfigurationErrorsException(SR.Config_base_collection_entry_already_removed);
797SR.Config_base_collection_elements_may_not_be_removed);
816throw new ConfigurationErrorsException(SR.Format(SR.Config_base_collection_entry_not_found, key));
851if (index < 0) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index));
869throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index));
889if (index < 0) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index));
903if (entry == null) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index));
910if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only);
941throw new ConfigurationErrorsException(SR.Config_base_collection_item_locked_cannot_clear);
963if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only);
978if (entry == null) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index));
981throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked,
996throw new ConfigurationErrorsException(SR.Config_base_cannot_remove_inherited_items);
999throw new ConfigurationErrorsException(SR.Config_base_cannot_remove_inherited_items);
1016throw new ConfigurationErrorsException(SR.Config_base_collection_entry_already_removed);
1021throw new ConfigurationErrorsException(SR.Config_base_collection_elements_may_not_be_removed);
1064throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved,
1125SR.Format(SR.Config_base_unrecognized_attribute, propertyName), reader);
1141throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, elementName));
1153throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, elementName));
1193throw new ConfigurationErrorsException(SR.Config_base_invalid_element_key);
System\Configuration\ConfigurationProperty.cs (21)
103SR.Format(SR.Validator_multiple_validator_attributes, info.Name));
228SR.Format(SR.Config_properties_may_not_be_derived_from_configuration_section, name));
259throw new ConfigurationErrorsException(SR.Format(SR.Validator_does_not_support_prop_type, Name));
266throw new ArgumentException(SR.String_null_or_empty, nameof(name));
269throw new ArgumentException(SR.Format(SR.Property_name_reserved, name));
281throw new ConfigurationErrorsException(SR.Format(SR.Default_value_wrong_type, Name));
309throw new ConfigurationErrorsException(SR.Format(SR.Default_value_conversion_error_from_string,
340throw new ConfigurationErrorsException(SR.Format(SR.Top_level_conversion_error_from_string, Name,
364SR.Format(SR.Top_level_conversion_error_to_string, Name, ex.Message));
377SR.Format(SR.Top_level_validation_error, Name, ex.Message), ex);
405throw new ConfigurationErrorsException(SR.Format(SR.No_converter, Name, Type.Name));
System\Configuration\ExceptionUtil.cs (15)
11internal static string NoExceptionInformation => SR.No_exception_information_available;
15return new ArgumentException(SR.Format(SR.Parameter_Invalid, parameter), parameter);
20return new ArgumentException(SR.Format(SR.Parameter_NullOrEmpty, parameter), parameter);
25return new ArgumentException(SR.Format(SR.Property_Invalid, property), property);
30return new ArgumentException(SR.Format(SR.Property_NullOrEmpty, property), property);
35return new InvalidOperationException(SR.Format(SR.Unexpected_Error, methodName));
75SR.Format(SR.Wrapped_exception_message, outerMessage, e.Message),
83SR.Format(SR.Wrapped_exception_message, outerMessage, NoExceptionInformation),
System\Configuration\HandlerBase.cs (17)
19SR.Format(SR.Config_missing_required_attribute, attrib, node.Name),
53SR.Format(SR.Config_invalid_boolean_attribute, a.Name),
75SR.Format(SR.Config_invalid_integer_attribute, a.Name), a);
85SR.Format(SR.Config_invalid_integer_attribute, a.Name),
103SR.Format(SR.Config_base_unrecognized_attribute, node.Attributes[0].Name),
135SR.Format(SR.Config_base_required_attribute_missing, name),
142SR.Format(SR.Config_base_required_attribute_empty, name),
153throw new ConfigurationErrorsException(SR.Config_base_elements_only, node);
173throw new ConfigurationErrorsException(SR.Config_base_no_child_nodes, node.FirstChild);
179throw new ConfigurationErrorsException(SR.Config_base_unrecognized_element, node);
System\Configuration\MgmtConfigurationRecord.cs (41)
199throw new ConfigurationErrorsException(SR.Format(SR.Config_unrecognized_configuration_section,
271SR.Format(SR.Config_exception_creating_section_handler, factoryRecord.ConfigKey),
417SR.Format(SR.Config_exception_in_config_section_handler,
488SR.Format(SR.Config_exception_in_config_section_handler,
546throw new ConfigurationErrorsException(SR.Config_source_requires_file);
570SR.Format(SR.Config_source_cannot_be_shared, newConfigSource));
607throw new ConfigurationErrorsException(SR.Format(SR.Config_unexpected_node_type, reader.NodeType));
613throw new ConfigurationErrorsException(SR.Format(SR.Config_unexpected_element_name, reader.Name));
622throw new ConfigurationErrorsException(SR.Config_unexpected_element_end,
634throw new ConfigurationErrorsException(SR.Config_invalid_node_type, reader);
640throw new ConfigurationErrorsException(SR.Config_more_data_than_expected, reader);
658throw new InvalidOperationException(SR.Config_add_configurationsection_in_location_config);
666throw new InvalidOperationException(SR.Config_add_configurationsection_already_added);
673throw new ArgumentException(SR.Config_add_configurationsection_already_exists);
818throw new InvalidOperationException(SR.Config_add_configurationsectiongroup_in_location_config);
828throw new InvalidOperationException(SR.Config_add_configurationsectiongroup_already_added);
834throw new ArgumentException(SR.Config_add_configurationsectiongroup_already_exists);
973throw new ArgumentException(SR.Format(SR.Filename_in_SaveAs_is_used_already, filename));
1020throw new ConfigurationErrorsException(SR.Config_file_has_changed,
1027throw new ConfigurationErrorsException(SR.Config_data_read_count_mismatch);
1049throw new ConfigurationErrorsException(SR.Config_file_has_changed, changedStreamName, 0);
1096throw ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e,
1116throw new ConfigurationErrorsException(SR.Config_file_has_changed,
1577SR.Format(SR.Config_inconsistent_location_attributes, configKey));
1677SR.Format(SR.Encryption_failed,
1697SR.Format(SR.Config_exception_in_config_section_handler,
1706throw new ConfigurationErrorsException(SR.Config_section_locked, (IConfigErrorInfo)null);
1885SR.Format(SR.Config_exception_in_config_section_handler, sectionRecord.ConfigKey), e,
3049throw ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, configSourceStreamName, 0);
System\Configuration\XmlUtil.cs (13)
92throw new ConfigurationErrorsException(SR.Config_base_unrecognized_element, this);
238SR.Config_base_unrecognized_element,
273SR.Format(SR.Config_base_unrecognized_attribute, Reader.Name),
282SR.Format(SR.Config_missing_required_attribute, attrib, Reader.Name),
291SR.Format(SR.Config_reserved_attribute, Reader.Name),
300SR.Config_base_unrecognized_element,
314SR.Format(SR.Empty_attribute, Reader.Name),
339new ConfigurationErrorsException(SR.Format(SR.Config_invalid_boolean_attribute, Reader.Name), this),
System\Diagnostics\ListenerElementsCollection.cs (16)
188throw new ConfigurationErrorsException(SR.Format(SR.Reference_listener_cant_have_properties, Name));
193throw new ConfigurationErrorsException(SR.Format(SR.Reference_to_nonexistent_listener, Name));
199throw new ConfigurationErrorsException(SR.Format(SR.Reference_to_nonexistent_listener, Name));
225throw new ConfigurationErrorsException(SR.Format(SR.Could_not_create_listener, Name), e);
314throw new ConfigurationErrorsException(SR.Format(SR.Reference_listener_cant_have_properties, Name));
319throw new ConfigurationErrorsException(SR.Format(SR.Reference_to_nonexistent_listener, Name));
325throw new ConfigurationErrorsException(SR.Format(SR.Reference_to_nonexistent_listener, Name));
365throw new ConfigurationErrorsException(SR.Format(SR.Could_not_create_listener, Name), e);