{"record":{"id":"87243452cddb8faa","repo":"microsoft/aspire","slug":"the-endpoint-s-string-join-unsupportedendpoints-select-r-r","errorCode":null,"errorMessage":"The endpoint(s) {string.Join(\", \", unsupportedEndpoints.Select(r => $\"'{r.Endpoint.Name}'\"))} specify an unsupported transport. The supported transports are 'http', 'http2', and 'tcp'.","messagePattern":"The endpoint\\(s\\) (.+?)'\"\\)\\)\\} specify an unsupported transport\\. The supported transports are 'http', 'http2', and 'tcp'\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs","lineNumber":149,"sourceCode":"    }\n\n    protected override void ProcessEndpoints()\n    {\n        // Resolve endpoint ports using the centralized helper\n        var resolvedEndpoints = Resource.ResolveEndpoints();\n\n        if (resolvedEndpoints.Count == 0)\n        {\n            return;\n        }\n\n        // Validate transport layer: only http-based and tcp transports are supported by Container Apps.\n        // The URI scheme (e.g. \"redis\", \"rediss\", \"foo\") is independent of transport.\n        var unsupportedEndpoints = resolvedEndpoints.Where(r => r.Endpoint.Transport is not (\"http\" or \"http2\" or \"tcp\")).ToArray();\n\n        if (unsupportedEndpoints.Length > 0)\n        {\n            throw new NotSupportedException($\"The endpoint(s) {string.Join(\", \", unsupportedEndpoints.Select(r => $\"'{r.Endpoint.Name}'\"))} specify an unsupported transport. The supported transports are 'http', 'http2', and 'tcp'.\");\n        }\n\n        // Group resolved endpoints by target port (aka destinations), this gives us the logical bindings or destinations\n        var endpointsByTargetPort = resolvedEndpoints\n            .Select((resolved, index) => (resolved, index))\n            .GroupBy(x => x.resolved.TargetPort.Value)\n            .Select(g => new\n            {\n                Port = g.Key,\n                ResolvedEndpoints = g.Select(x => x.resolved).ToArray(),\n                External = g.Any(x => x.resolved.Endpoint.IsExternal),\n                IsHttpOnly = g.All(x => x.resolved.Endpoint.Transport is \"http\" or \"http2\"),\n                AnyH2 = g.Any(x => x.resolved.Endpoint.Transport is \"http2\"),\n                UniqueTransports = g.Select(x => x.resolved.Endpoint.Transport).Distinct().ToArray(),\n                Index = g.Min(x => x.index)\n            })\n            .ToList();\n","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs#L131-L167","documentation":"Container Apps only support http, http2, and tcp transports for ingress/listeners. When generating Container App infrastructure, Aspire resolves all endpoints on the resource and throws this NotSupportedException if any endpoint's transport is outside that set (e.g., redis, udp, or a custom scheme's transport). The URI scheme is independent of transport, so a scheme like 'redis' is fine as long as transport is http or tcp.","triggerScenarios":"Calling WithEndpoint/WithHttpEndpoint/WithHttpsEndpoint with an explicit transport other than http/http2/tcp, or a custom endpoint (e.g., WithEndpoint(name: \"redis\", port: 6379) on a resource whose default transport resolution yields an unsupported value) on a project/container resource published to Container Apps.","commonSituations":"Exposing database/cache endpoints (redis, postgres) with scheme-based transports; porting endpoints defined with WithEndpoint(endpointName, scheme: \"redis\") defaults that map to a non-TCP transport; third-party extension resources declaring exotic transports.","solutions":["Set the endpoint transport explicitly to \"tcp\" for raw socket endpoints: .WithEndpoint(...).WithTransport(\"tcp\").","Use http/http2 endpoints for HTTP-based ingress.","Remove the unsupported endpoint from the resource if it isn't needed in Container Apps."],"exampleFix":"// before\n.WithEndpoint(6379, endpoint => endpoint.Name = \"redis\"); // resolves to unsupported transport\n\n// after\n.WithEndpoint(6379, endpoint => endpoint.Name = \"redis\".WithTransport(\"tcp\"));\n// or: .WithEndpoint(name: \"redis\", port: 6379, scheme: null).WithTransport(\"tcp\")","handlingStrategy":"validation","validationCode":"var bad = resource.GetEndpoints().Where(e => e.Endpoint.Transport is not (\"http\" or \"http2\" or \"tcp\"));\nif (bad.Any()) throw new InvalidOperationException($\"Unsupported transports: {string.Join(',', bad.Select(b => b.Endpoint.Name))}\");","typeGuard":"bool IsContainerAppsTransport(string? t) => t is \"http\" or \"http2\" or \"tcp\";","tryCatchPattern":"try { /* build/publish */ } catch (NotSupportedException ex) when (ex.Message.Contains(\"unsupported transport\")) { /* fix endpoint transports */ }","preventionTips":["For raw socket services (redis, databases), always set transport explicitly to tcp.","Remember scheme (redis, rediss) is independent of transport; validate both.","Run aspire publish/generate locally in CI before deploying."],"tags":["azure","container-apps","endpoints","transport"],"backgroundTag":"unsupported-enum-value","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}