119 references to InvalidOperationException
InteropTests (2)
InteropTests.cs (2)
96throw new InvalidOperationException(errorMessage, ex); 125throw new InvalidOperationException(errorMessage, ex);
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectHandler.cs (2)
148throw new InvalidOperationException("An error was returned from the RemoteSignOut event.", remoteSignOutContext.Result.Failure); 345throw new InvalidOperationException("An error was returned from the SignedOutCallbackRedirect event.", signOut.Result.Failure);
Microsoft.AspNetCore.Components (1)
Reflection\ComponentProperties.cs (1)
171throw new InvalidOperationException(
Microsoft.AspNetCore.Components.Web (3)
Forms\InputExtensions.cs (1)
48throw new InvalidOperationException($"{input.GetType()} does not support the type '{typeof(TValue)}'.", ex);
WebEventData\WebEventData.cs (2)
29throw new InvalidOperationException("Error parsing the event descriptor", e); 83throw new InvalidOperationException($"There was an error parsing the event arguments. EventId: '{eventHandlerId}'.", e);
Microsoft.AspNetCore.Components.WebAssembly (1)
Prerendering\WebAssemblyComponentParameterDeserializer.cs (1)
69throw new InvalidOperationException($"Could not parse the parameter value for parameter '{definition.Name}' of type '{definition.TypeName}' and assembly '{definition.Assembly}'.", e);
Microsoft.AspNetCore.Connections.Abstractions (1)
Exceptions\AddressInUseException.cs (1)
26public AddressInUseException(string message, Exception inner) : base(message, inner)
Microsoft.AspNetCore.DataProtection (2)
Error.cs (1)
103return new InvalidOperationException(Resources.KeyRingProvider_RefreshFailedOnOtherThread, inner);
TypeExtensions.cs (1)
40throw new InvalidOperationException($"Unable to load type '{typeName}'. If the app is published with trimming then this type may have been trimmed. Ensure the type's assembly is excluded from trimming.", ex);
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
217edi = ExceptionDispatchInfo.Capture(new InvalidOperationException($"The exception handler configured on {nameof(ExceptionHandlerOptions)} produced a 404 status response. " +
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
MigrationsEndPointMiddleware.cs (1)
90throw new InvalidOperationException(message, ex);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests (1)
DatabaseDeveloperPageExceptionFilterTests.cs (1)
49var exception = new InvalidOperationException("Bang!", new Mock<DbException>().Object);
Microsoft.AspNetCore.Grpc.JsonTranscoding (5)
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (1)
225throw new InvalidOperationException($"Error binding {method.Name} on {typeof(TService).Name} to HTTP API.", ex);
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (1)
81throw new InvalidOperationException($"Error binding gRPC service '{typeof(TService).Name}'.", ex);
Internal\JsonRequestHelpers.cs (2)
83throw new InvalidOperationException($"Unable to read the request as JSON because the request content type charset '{charset}' is not a known encoding.", ex); 114throw new InvalidOperationException($"Error when parsing the '{StatusDetailsTrailerName}' trailer.", ex);
src\Grpc\JsonTranscoding\src\Shared\HttpRoutePatternParser.cs (1)
57throw new InvalidOperationException($"Error parsing path template '{_input}'.", ex);
Microsoft.AspNetCore.Grpc.Swagger (1)
src\Grpc\JsonTranscoding\src\Shared\HttpRoutePatternParser.cs (1)
57throw new InvalidOperationException($"Error parsing path template '{_input}'.", ex);
Microsoft.AspNetCore.Hosting (3)
GenericHost\GenericWebHostBuilder.cs (1)
156exceptions.Add(new InvalidOperationException($"Startup assembly {assemblyName} failed to execute. See the inner exception for more details.", ex));
Internal\ConfigureBuilder.cs (1)
46throw new InvalidOperationException(string.Format(
WebHostBuilder.cs (1)
249exceptions.Add(new InvalidOperationException($"Startup assembly {assemblyName} failed to execute. See the inner exception for more details.", ex));
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
ShutdownTests.cs (2)
98throw new InvalidOperationException("Timeout while waiting for host process to output started message.", ex); 111throw new InvalidOperationException($"Timeout while waiting for host process to output completion message. The received output is: {output}", ex);
WebHostBuilderTests.cs (1)
59throw new InvalidOperationException("Timeout while waiting for output from host process.", ex);
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\WebSocketsTransport.cs (1)
415throw new InvalidOperationException("Reconnect attempt failed.", innerException: ex);
Microsoft.AspNetCore.Http.Extensions (1)
HttpRequestJsonExtensions.cs (1)
342throw new InvalidOperationException($"Unable to read the request as JSON because the request content type charset '{charset}' is not a known encoding.", ex);
Microsoft.AspNetCore.Mvc.Core (2)
Filters\MiddlewareFilterConfigurationProvider.cs (1)
110throw new InvalidOperationException(
ModelBinding\Metadata\ModelAttributes.cs (1)
235throw new InvalidOperationException("Only one ModelMetadataType attribute is permitted per type.", e);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
ExpressionHelper.cs (1)
225throw new InvalidOperationException(
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheTests.cs (1)
1028throw new InvalidOperationException($"Client {id} failed; payload '{s}', failure: {ex.Message}", ex);
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Certificates\CertificateConfigLoader.cs (1)
152return new InvalidOperationException($"Error getting private key from '{keyPath}'.", ex);
Internal\Http3\Http3FrameWriter.cs (1)
378throw new InvalidOperationException(ex.Message, ex); // Report the error to the user if this was the first write.
Internal\Infrastructure\HttpUtilities.cs (1)
157throw new InvalidOperationException(ex.Message, ex);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (1)
361throw new InvalidOperationException($"Error when checking header '{expectedValue.Key}'.", ex);
Microsoft.AspNetCore.Shared.Tests (1)
runtime\Http3\QPackDecoderTest.cs (1)
361throw new InvalidOperationException($"Error when checking header '{expectedValue.Key}'.", ex);
Microsoft.AspNetCore.SpaServices.Extensions (5)
AngularCli\AngularCliBuilder.cs (2)
74throw new InvalidOperationException( 81throw new InvalidOperationException(
AngularCli\AngularCliMiddleware.cs (1)
81throw new InvalidOperationException(
Npm\NodeScriptRunner.cs (1)
141throw new InvalidOperationException(message, ex);
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
95throw new InvalidOperationException(
Microsoft.AspNetCore.TestHost (1)
HttpContextBuilder.cs (1)
200throw new InvalidOperationException("An error occurred when completing the request. Request delegate may have finished while there is a pending read of the request body.", ex);
Microsoft.Build (2)
ManagedFileSystem.cs (2)
73throw new InvalidOperationException(ex.Message, ex); 78throw new InvalidOperationException(ex.Message, ex);
Microsoft.Build.Framework (1)
ThrowHelper.cs (1)
165throw new InvalidOperationException(GetResourceString(resource), e);
Microsoft.Extensions.Configuration.Binder (7)
ConfigurationBinder.cs (7)
508throw new InvalidOperationException(SR.Format(SR.Error_FailedToActivate, type), ex); 688throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 727throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 783throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 854throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 895error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, path, type), ex); 908error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, path, type), ex);
Microsoft.Extensions.DependencyInjection (1)
ServiceProvider.cs (1)
201throw new InvalidOperationException($"Error while validating the service descriptor '{descriptor}': {e.Message}", e);
PresentationCore (11)
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
433throw new InvalidOperationException(SR.ByteRangeDownloaderErroredOut, _erroredOutException);
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (7)
806return new System.InvalidOperationException(SR.Image_WrongState, exceptionForHR); 819return new System.InvalidOperationException(SR.WIC_NotInitialized, exceptionForHR); 831return new System.InvalidOperationException(SR.Image_CodecPresent, exceptionForHR); 837return new System.InvalidOperationException(SR.Image_NoPalette, exceptionForHR); 843return new System.InvalidOperationException(SR.Image_InternalError, exceptionForHR); 869return new System.InvalidOperationException(SR.Image_StreamWrite, exceptionForHR); 917return new System.InvalidOperationException(SR.Image_DisplayStateInvalid, exceptionForHR);
System\Windows\Markup\XmlLanguage.cs (2)
205throw new InvalidOperationException(SR.Format(SR.XmlLangGetCultureFailure, lowerCaseTag), e); 258throw new InvalidOperationException(SR.Format(SR.XmlLangGetSpecificCulture, _lowerCaseTag), e);
System\Windows\Media\textformatting\TextParagraphCache.cs (1)
94throw new InvalidOperationException(SR.Format(SR.CreateParaBreakingSessionFailure, lserr), callbackException);
PresentationFramework (5)
MS\Internal\AppModel\AppSecurityManager.cs (1)
154throw new InvalidOperationException(SR.FailToLaunchDefaultBrowser,
MS\Internal\Data\RBTree.cs (1)
130throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
587throw new InvalidOperationException(SR.CannotParseId, fe);
System\Windows\Controls\DataGrid.cs (1)
7159throw new InvalidOperationException(SR.DataGrid_ProbableInvalidSortDescription, invalidOperationException);
System\Windows\Controls\ItemContainerGenerator.cs (1)
1108throw new InvalidOperationException(SR.Generator_Inconsistent, exception);
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\CatalogReflectionContextAttribute.cs (1)
39throw new InvalidOperationException(SR.ReflectionContext_Type_Required, invalidCastException);
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (2)
179throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 214throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions));
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnWriter.cs (1)
421throw new InvalidOperationException(new InvalidOperationException().Message, e);
System.Net.Http (1)
System\Net\Http\HttpContent.cs (1)
201throw new InvalidOperationException(SR.net_http_content_invalid_charset, e);
System.Net.Http.Json (1)
System\Net\Http\Json\JsonHelpers.cs (1)
50throw new InvalidOperationException(SR.CharSetInvalid, e);
System.Net.Ping (1)
System\Net\NetworkInformation\PingException.cs (1)
19base(message, innerException)
System.Net.Requests (1)
System\Net\WebException.cs (1)
45base(message, innerException)
System.Private.CoreLib (8)
src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (1)
39: base(message ?? SR.ObjectDisposed_Generic, innerException)
src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (1)
104throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (1)
267throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\SwitchExpressionException.cs (2)
22base(SR.Arg_SwitchExpressionException, innerException) 41: base(message ?? SR.Arg_SwitchExpressionException, innerException) { }
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (2)
75throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, entryPointNotFoundException); 79throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, dllNotFoundException);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (1)
416throw new InvalidOperationException(GetResourceString(resource), e);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\Json\XmlJsonReader.cs (1)
353throw new InvalidOperationException(SR.GenericCallbackException, e);
System.Private.Xml (13)
System\Xml\Serialization\Compilation.cs (3)
75throw new InvalidOperationException(ex.Message, ex); 627throw new InvalidOperationException(SR.XmlNoPartialTrust, e); 654throw new InvalidOperationException(SR.XmlNoPartialTrust, e);
System\Xml\Serialization\Models.cs (1)
210throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedMember, $"{member.DeclaringType!.FullName}.{member.Name}", type.FullName), typeDesc.Exception);
System\Xml\Serialization\SoapReflectionImporter.cs (1)
139return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e);
System\Xml\Serialization\XmlReflectionImporter.cs (3)
363return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e); 368return new InvalidOperationException(SR.Format(SR.XmlTypeReflectionError, context), e); 373return new InvalidOperationException(SR.Format(model.IsProperty ? SR.XmlPropertyReflectionError : SR.XmlFieldReflectionError, model.Name), e);
System\Xml\Serialization\XmlSchemas.cs (2)
691throw new InvalidOperationException(GetSchemaItem(source, null, message), exception); 707throw new InvalidOperationException(SR.Format(SR.XmlSchemaSyntaxErrorDetails, ns, message, exception.LineNumber, exception.LinePosition), exception);
System\Xml\Serialization\XmlSerializer.cs (3)
396throw new InvalidOperationException(SR.XmlGenError, e); 491throw new InvalidOperationException(SR.Format(SR.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(CultureInfo.InvariantCulture), lineInfo.LinePosition.ToString(CultureInfo.InvariantCulture)), e); 495throw new InvalidOperationException(SR.XmlSerializeError, e);
System.Security.Cryptography.Cose (4)
System\Security\Cryptography\Cose\CoseHeaderValue.cs (4)
146throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 173throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 200throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 232throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex);
System.Text.Json (1)
System\Text\Json\ThrowHelper.cs (1)
548InvalidOperationException ex = new InvalidOperationException(message, innerException);
System.Threading.Channels (2)
System\Threading\Channels\ChannelClosedException.cs (2)
20base(SR.ChannelClosedException_DefaultMessage, innerException) { } 25public ChannelClosedException(string? message, Exception? innerException) : base(message ?? SR.ChannelClosedException_DefaultMessage, innerException) { }
System.Transactions.Local (2)
System\Transactions\TransactionException.cs (2)
49return new InvalidOperationException(messagewithTxId, innerException); 60return new InvalidOperationException(message, innerException);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\BrowserFixture.cs (1)
203throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\BrowserFixture.cs (1)
203throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\BrowserFixture.cs (1)
203throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
Templates.Tests (1)
src\Shared\E2ETesting\BrowserFixture.cs (1)
203throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\Accessible.cs (2)
552throw new InvalidOperationException(SR.OperationCannotBePerformed, e); 1158throw new InvalidOperationException(SR.OperationCannotBePerformed, e);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (1)
1218throw new InvalidOperationException(SR.OperationCannotBePerformed, e);
UIAutomationTypes (1)
System\Windows\Automation\ElementNotEnabledException.cs (1)
50public ElementNotEnabledException(string message, Exception innerException) : base(message, innerException)
WindowsFormsIntegration (1)
System\Windows\Integration\PropertyMap.cs (1)
344throw new InvalidOperationException(SR.WFI_PropertyMapError, ex);