microsoft/aspire · error · NotSupportedException
The endpoint(s) '"))} specify an unsupported transport. The…
Error message
The endpoint(s) {string.Join(", ", unsupportedEndpoints.Select(r => $"'{r.Endpoint.Name}'"))} specify an unsupported transport. The supported transports are 'http', 'http2', and 'tcp'. What it means
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.
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.
Example fix
// before
.WithEndpoint(6379, endpoint => endpoint.Name = "redis"); // resolves to unsupported transport
// after
.WithEndpoint(6379, endpoint => endpoint.Name = "redis".WithTransport("tcp"));
// or: .WithEndpoint(name: "redis", port: 6379, scheme: null).WithTransport("tcp") Defensive patterns
Strategy: validation
Validate before calling
var bad = resource.GetEndpoints().Where(e => e.Endpoint.Transport is not ("http" or "http2" or "tcp"));
if (bad.Any()) throw new InvalidOperationException($"Unsupported transports: {string.Join(',', bad.Select(b => b.Endpoint.Name))}"); Type guard
bool IsContainerAppsTransport(string? t) => t is "http" or "http2" or "tcp";
Try / catch
try { /* build/publish */ } catch (NotSupportedException ex) when (ex.Message.Contains("unsupported transport")) { /* fix endpoint transports */ } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Container port is required for all endpoints
- External non-HTTP(s) endpoints are not supported
- HTTP(s) and TCP endpoints cannot be mixed
- Multiple external endpoints are not supported
- The property ' ' is not supported for the endpoint ' '.
AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16).
Data as JSON: /api/errors/87243452cddb8faa.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Hosting.Azure.AppContainers/ContainerAppContext.cs:149
}
protected override void ProcessEndpoints()
{
// Resolve endpoint ports using the centralized helper
var resolvedEndpoints = Resource.ResolveEndpoints();
if (resolvedEndpoints.Count == 0)
{
return;
}
// Validate transport layer: only http-based and tcp transports are supported by Container Apps.
// The URI scheme (e.g. "redis", "rediss", "foo") is independent of transport.
var unsupportedEndpoints = resolvedEndpoints.Where(r => r.Endpoint.Transport is not ("http" or "http2" or "tcp")).ToArray();
if (unsupportedEndpoints.Length > 0)
{
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'.");
}
// Group resolved endpoints by target port (aka destinations), this gives us the logical bindings or destinations
var endpointsByTargetPort = resolvedEndpoints
.Select((resolved, index) => (resolved, index))
.GroupBy(x => x.resolved.TargetPort.Value)
.Select(g => new
{
Port = g.Key,
ResolvedEndpoints = g.Select(x => x.resolved).ToArray(),
External = g.Any(x => x.resolved.Endpoint.IsExternal),
IsHttpOnly = g.All(x => x.resolved.Endpoint.Transport is "http" or "http2"),
AnyH2 = g.Any(x => x.resolved.Endpoint.Transport is "http2"),
UniqueTransports = g.Select(x => x.resolved.Endpoint.Transport).Distinct().ToArray(),
Index = g.Min(x => x.index)
})
.ToList();
View on GitHub (pinned to 25830f84bd)