{"record":{"id":"cff53a41d1a21f60","repo":"tursodatabase/turso","slug":"operation-is-not-available-for-direct-remote-con","errorCode":null,"errorMessage":"{operation} is not available for direct remote connections.","messagePattern":"(.+?) is not available for direct remote connections\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"bindings/dotnet/src/Turso.Data.Sqlite/SqliteConnection.cs","lineNumber":857,"sourceCode":"        var currentState = State;\n        if (currentState != originalState)\n            OnStateChange(new StateChangeEventArgs(originalState, currentState));\n    }\n\n    private void ThrowIfManagedLocalOnly(string operation)\n    {\n        if (_managedConnection is not null)\n        {\n            throw new NotSupportedException(\n                $\"{operation} is not available for direct remote or embedded replica connections.\");\n        }\n    }\n\n    private void ThrowIfDirectRemote(string operation)\n    {\n        if (IsDirectRemote)\n        {\n            throw new NotSupportedException(\n                $\"{operation} is not available for direct remote connections.\");\n        }\n    }\n\n    private void RegisterManagedReplicaCallbacks()\n    {\n        if (!IsReplica)\n            return;\n\n        using var syncOperation = ManagedConnection.EnterSyncOperation();\n        RegisterScalarFunctions();\n        RegisterAggregateFunctions();\n        RegisterCollations();\n    }\n\n    private void ApplyConnectionOptions()\n    {\n        if (_connectionOptions.ForeignKeys.HasValue)","sourceCodeStart":839,"sourceCodeEnd":875,"githubUrl":"https://github.com/tursodatabase/turso/blob/6c7252267988c76e632af00a671e4b9788dfae13/bindings/dotnet/src/Turso.Data.Sqlite/SqliteConnection.cs#L839-L875","documentation":"Thrown by the ThrowIfDirectRemote guard when the requested operation is invoked on a connection whose IsDirectRemote flag is true, meaning it talks straight to a remote server with no local database file. The operation name is interpolated into the message; the unsupported input is the direct-remote connection mode itself.","triggerScenarios":"Thrown at bindings/dotnet/src/Turso.Data.Sqlite/SqliteConnection.cs:857 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an embedded replica or local file connection instead of a direct remote URL for this operation","Reconfigure the connection string to point at a local database file with optional sync","Route the operation through an API that is supported over remote connections"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c7252267988c76e632af00a671e4b9788dfae13","analyzedAt":"2026-09-06T07:15:26.990Z","contentChangedAt":"2026-09-06T07:15:26.990Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}