Error map

Cannot access a disposed context instance ObjectDisposedException: Cannot access a disposed context instance

.NET · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

Cannot access a disposed context instance — ObjectDisposedException: Cannot access a disposed context instance (.NET)Cannot acce…InvalidOperationException — InvalidOperationException: Unable to resolve service for type 'X' while attempting to activate 'Y' (.NET)InvalidOperationExc…An unhandled error has occurred — Blazor: An unhandled error has occurred. Reload 🗙 (.NET)An unhandled error …requires a primary key to be defined — EF Core: The entity type 'X' requires a primary key to be defined (.NET)requires a primary …DbUpdateException — DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. (.NET)DbUpdateExceptionUnable to create a 'DbContext' — dotnet ef: Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type DbContextOptions' was thrown while attempting to create an instance (.NET)Unable to create a …Failed to complete negotiation with the server — SignalR: Error: Failed to complete negotiation with the server / Failed to start the connection (.NET)Failed to complete …A second operation was started on this context — EF Core: A second operation was started on this context instance before a previous operation completed (.NET)A second operation …500.19 — HTTP Error 500.19 - Internal Server Error: The requested page cannot be accessed because the related configuration data for the page is invalid (.NET)500.19JsonException object cycle — JsonException: A possible object cycle was detected (.NET)JsonException objec…No database provider has been configured — InvalidOperationException: No database provider has been configured for this DbContext (.NET)No database provide…The LINQ expression could not be translated — EF Core: The LINQ expression 'x' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly (.NET)The LINQ expression…E0502 — Rust: error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable (Rust)E0502NullReferenceException — System.NullReferenceException: Object reference not set to an instance of an object (.NET)NullReferenceExcept…500.30 — HTTP Error 500.30 - ASP.NET Core app failed to start (.NET)500.30UnsatisfiedDependencyException — UnsatisfiedDependencyException / NoSuchBeanDefinitionException: No qualifying bean of type 'X' available (Java)UnsatisfiedDependen…CalledFromWrongThreadException — CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views (Android)CalledFromWrongThre…BadTokenException — WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? (Android)BadTokenExceptionCORS wildcard with credentials — ASP.NET Core: The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time (.NET)CORS wildcard with …cannot be tracked because another instance with the same key — The instance of entity type 'X' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked (.NET)cannot be tracked b…1062 — MySQL ERROR 1062 (23000): Duplicate entry for key (MySQL)10621452 — MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails (MySQL)145223505 — PostgreSQL: ERROR: duplicate key value violates unique constraint (PostgreSQL)235051146 — MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist (MySQL)114642P01 — PostgreSQL: ERROR: relation "x" does not exist (PostgreSQL)42P011022 — MySQL ERROR 1022 (23000): Can't write; duplicate key in table (MySQL)1022CORS — CORS Error: No 'Access-Control-Allow-Origin' header is present (API)CORSWebSocket failed — WebSocket connection to 'wss://x' failed (JavaScript)WebSocket failedThe request matched multiple endpoints — AmbiguousMatchException: The request matched multiple endpoints. Matches: X, Y (.NET)The request matched…409 — HTTP 409 Conflict (HTTP)409ConcurrentModificationException — java.util.ConcurrentModificationException (Java)ConcurrentModificat…412 — HTTP 412 Precondition Failed (HTTP)4120x80070005 — Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied (Windows)0x80070005Collection was modified — InvalidOperationException: Collection was modified; enumeration operation may not execute (.NET)Collection was modi…antiforgery token could not be decrypted — ASP.NET Core: The antiforgery token could not be decrypted / The required antiforgery cookie is not present (400 Bad Request) (.NET)antiforgery token c…RangeError — RangeError: Maximum call stack size exceeded (JavaScript)RangeErrorStackOverflowError — java.lang.StackOverflowError (Java)StackOverflowErrorMismatchedInputException — com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.util.ArrayList` from Object value (Java)MismatchedInputExce…413 — HTTP 413 Content Too Large (Request Entity Too Large) (HTTP)413redirect_uri_mismatch — OAuth Error: redirect_uri_mismatch (Authentication)redirect_uri_mismat…CreateContainerConfigError — Kubernetes: CreateContainerConfigError — secret / configmap not found (Kubernetes)CreateContainerConf…Sequence contains no elements — InvalidOperationException: Sequence contains no elements / more than one element (.NET)Sequence contains n…E0382 — Rust: error[E0382]: borrow of moved value: `x` (Rust)E0382E0308 — Rust: error[E0308]: mismatched types — expected `X`, found `Y` (Rust)E0308

Directly related (12)

InvalidOperationException.NET

InvalidOperationException: Unable to resolve service for type 'X' while attempting to activate 'Y'

ASP.NET Core’s dependency injection container can’t build Y because one of its constructor dependencies (X) was never registered.

An unhandled error has occurred.NET

Blazor: An unhandled error has occurred. Reload 🗙

A Blazor component threw an exception; Blazor Server tears down the circuit (or WebAssembly logs to the console) and shows the re…

requires a primary key to be defined.NET

EF Core: The entity type 'X' requires a primary key to be defined

EF Core found an entity class without a key property it can recognise.

DbUpdateException.NET

DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.

SaveChanges failed in the database; the inner exception (SqlException/PostgresException) has the real reason — constraint violati…

Unable to create a 'DbContext'.NET

dotnet ef: Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type DbContextOptions' was thrown while attempting to create an instance

dotnet ef migrations couldn’t construct your DbContext at design time.

Failed to complete negotiation with the server.NET

SignalR: Error: Failed to complete negotiation with the server / Failed to start the connection

The SignalR client couldn’t negotiate with the hub — wrong URL, CORS, authentication, or a proxy that blocks WebSockets/negotiate…

A second operation was started on this context.NET

EF Core: A second operation was started on this context instance before a previous operation completed

The same DbContext was used concurrently — async calls not awaited, parallel tasks sharing a context, or a context registered as…

500.19.NET

HTTP Error 500.19 - Internal Server Error: The requested page cannot be accessed because the related configuration data for the page is invalid

IIS can’t read web.config — usually the ASP.NET Core Hosting Bundle (AspNetCoreModuleV2) or URL Rewrite module isn’t installed, o…

JsonException object cycle.NET

JsonException: A possible object cycle was detected

System.Text.Json found a reference loop (e.g. Order → Customer → Orders → …) while serialising, usually from EF Core navigation p…

No database provider has been configured.NET

InvalidOperationException: No database provider has been configured for this DbContext

EF Core created a DbContext without UseSqlServer/UseNpgsql/UseSqlite — typically because the context was newed up manually or reg…

The LINQ expression could not be translated.NET

EF Core: The LINQ expression 'x' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly

The query uses C# code EF Core can’t convert to SQL — custom methods, unsupported string/date functions, or complex projections.

E0502Rust

Rust: error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable

You tried to mutate a value while an immutable reference to it is still in use.

Two steps away (31)

NullReferenceException.NET

System.NullReferenceException: Object reference not set to an instance of an object

Code dereferenced a variable that is `null` — the .NET equivalent of Java’s NullPointerException.

500.30.NET

HTTP Error 500.30 - ASP.NET Core app failed to start

IIS/Azure’s ASP.NET Core Module launched your app but it crashed during startup.

UnsatisfiedDependencyExceptionJava

UnsatisfiedDependencyException / NoSuchBeanDefinitionException: No qualifying bean of type 'X' available

Spring couldn’t find (or choose) a bean to inject.

CalledFromWrongThreadExceptionAndroid

CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views

Background code updated a View directly; UI changes must happen on the main thread.

BadTokenExceptionAndroid

WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?

A dialog or popup was shown with a context whose Activity is finishing/destroyed, or with the Application context.

CORS wildcard with credentials.NET

ASP.NET Core: The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time

The CORS policy uses AllowAnyOrigin() together with AllowCredentials(), which browsers forbid.

cannot be tracked because another instance with the same key.NET

The instance of entity type 'X' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked

Two different objects with the same primary key were attached to one DbContext.

1062MySQL

MySQL ERROR 1062 (23000): Duplicate entry for key

An INSERT/UPDATE would create a duplicate value in a PRIMARY or UNIQUE key.

1452MySQL

MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

You inserted/updated a row whose foreign key value doesn’t exist in the referenced parent table.

23505PostgreSQL

PostgreSQL: ERROR: duplicate key value violates unique constraint

An INSERT/UPDATE would create a duplicate in a UNIQUE or PRIMARY KEY column — or the id sequence is behind the existing data.

1146MySQL

MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist

The query references a table that MySQL can’t find in that database.

42P01PostgreSQL

PostgreSQL: ERROR: relation "x" does not exist

The table/view isn’t found — missing migration, wrong schema, or a case-sensitive quoted name.

1022MySQL

MySQL ERROR 1022 (23000): Can't write; duplicate key in table

An ALTER/CREATE produced a duplicate key or constraint name — often a foreign key name that already exists in the database.

CORSAPI

CORS Error: No 'Access-Control-Allow-Origin' header is present

The browser blocked a cross-origin request because the server’s response didn’t include the CORS headers allowing your site’s ori…

WebSocket failedJavaScript

WebSocket connection to 'wss://x' failed

The browser couldn’t open (or keep) a WebSocket connection.

The request matched multiple endpoints.NET

AmbiguousMatchException: The request matched multiple endpoints. Matches: X, Y

Two controller actions or minimal API endpoints have the same route and HTTP method.

409HTTP

HTTP 409 Conflict

The request conflicts with the current state of the resource — e.g. a duplicate or an edit based on an outdated version.

ConcurrentModificationExceptionJava

java.util.ConcurrentModificationException

A collection was modified while being iterated (even in a single thread).

412HTTP

HTTP 412 Precondition Failed

A conditional request header (If-Match, If-Unmodified-Since) didn’t match the current state of the resource.

0x80070005Windows

Windows Error 0x80070005 (E_ACCESSDENIED): Access is denied

Windows refused an operation because the account or process lacks permission — seen in Windows Update, installers, Task Scheduler…

Collection was modified.NET

InvalidOperationException: Collection was modified; enumeration operation may not execute

A list/dictionary was changed while a foreach loop was iterating it.

antiforgery token could not be decrypted.NET

ASP.NET Core: The antiforgery token could not be decrypted / The required antiforgery cookie is not present (400 Bad Request)

Form POST failed antiforgery validation — the token is missing, the cookie is missing, or Data Protection keys changed so old tok…

RangeErrorJavaScript

RangeError: Maximum call stack size exceeded

A function called itself (directly or indirectly) too many times — usually infinite recursion.

StackOverflowErrorJava

java.lang.StackOverflowError

The thread’s call stack overflowed — almost always unbounded recursion, sometimes a bidirectional toString/equals/JSON cycle.

MismatchedInputExceptionJava

com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.util.ArrayList` from Object value

Jackson found JSON whose shape doesn’t match the target Java type (object vs array, string vs number, missing constructor).

413HTTP

HTTP 413 Content Too Large (Request Entity Too Large)

The request body is bigger than the server is willing to accept — usually a file upload over the configured limit.

redirect_uri_mismatchAuthentication

OAuth Error: redirect_uri_mismatch

The redirect URI in your OAuth request doesn’t exactly match one registered for the client in the provider’s console.

CreateContainerConfigErrorKubernetes

Kubernetes: CreateContainerConfigError — secret / configmap not found

Kubernetes can’t build the container’s configuration — usually a referenced Secret, ConfigMap or key doesn’t exist in that namesp…

Sequence contains no elements.NET

InvalidOperationException: Sequence contains no elements / more than one element

LINQ `First()`, `Single()`, `Last()` or `Max()` ran on an empty sequence (or `Single()` found several items).

E0382Rust

Rust: error[E0382]: borrow of moved value: `x`

A value was moved (ownership transferred) and then used again.

E0308Rust

Rust: error[E0308]: mismatched types — expected `X`, found `Y`

A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…