{"record":{"id":"fa3705ed6b252789","repo":"microsoft/aspire","slug":"the-property-property-is-not-supported-for-the-endpoint","errorCode":null,"errorMessage":"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.","messagePattern":"The property '(.+?)' is not supported for the endpoint '(.+?)'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs","lineNumber":387,"sourceCode":"        var property = endpointReferenceExpression.Property;\n        var endpoint = endpointReference.EndpointAnnotation;\n        var scheme = PreserveHttpEndpoints ? endpoint.UriScheme : \"https\";\n        var port = string.Equals(scheme, \"http\", StringComparison.OrdinalIgnoreCase) ? 80 : 443;\n        var tlsEnabled = string.Equals(scheme, \"https\", StringComparison.OrdinalIgnoreCase) || endpoint.TlsEnabled;\n        var host = GetHostAddressExpression(endpointReference);\n\n        return property switch\n        {\n            EndpointProperty.Url => ReferenceExpression.Create($\"{scheme}://{host}\"),\n            EndpointProperty.Host or EndpointProperty.IPV4Host => host,\n            EndpointProperty.Port => ReferenceExpression.Create($\"{port.ToString(CultureInfo.InvariantCulture)}\"),\n            EndpointProperty.TargetPort => endpoint.TargetPort is int targetPort\n                ? ReferenceExpression.Create($\"{targetPort.ToString(CultureInfo.InvariantCulture)}\")\n                : ReferenceExpression.Create($\"{new ContainerPortReference(endpointReference.Resource)}\"),\n            EndpointProperty.Scheme => ReferenceExpression.Create($\"{scheme}\"),\n            EndpointProperty.HostAndPort => ReferenceExpression.Create($\"{host}:{port.ToString(CultureInfo.InvariantCulture)}\"),\n            EndpointProperty.TlsEnabled => ReferenceExpression.Create($\"{(tlsEnabled ? bool.TrueString : bool.FalseString)}\"),\n            _ => throw new InvalidOperationException($\"The property '{property}' is not supported for the endpoint '{endpoint.Name}'.\")\n        };\n    }\n\n    internal BicepOutputReference GetVolumeStorage(IResource resource, ContainerMountAnnotation volume, int volumeIndex)\n    {\n        var prefix = volume.Type switch\n        {\n            ContainerMountType.BindMount => \"bindmounts\",\n            ContainerMountType.Volume => \"volumes\",\n            _ => throw new NotSupportedException()\n        };\n\n        // REVIEW: Should we use the same naming algorithm as azd?\n        // Normalize the resource name to ensure it's compatible with Bicep identifiers (only letters, numbers, and underscores)\n        var normalizedResourceName = Infrastructure.NormalizeBicepIdentifier(resource.Name);\n        var outputName = $\"{prefix}_{normalizedResourceName}_{volumeIndex}\";\n\n        if (!VolumeNames.TryGetValue(outputName, out var volumeName))","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppEnvironmentResource.cs#L369-L405","documentation":"When resolving endpoint property expressions for Container Apps (used in Bicep generation), GetEndpointPropertyExpression supports only known EndpointProperty values (Host, Port, TargetPort, Scheme, HostAndPort, TlsEnabled, etc.). An unrecognized property falls into the default arm and throws this InvalidOperationException naming the property and endpoint.","triggerScenarios":"A switch arm lookup for an EndpointProperty not handled for Container App endpoints — typically a new EndpointProperty enum member added in a newer Aspire version while this code path handles only the existing set, or a caller requesting a property the Container App environment cannot express.","commonSituations":"Version mismatch between Aspire packages that share the EndpointProperty enum, custom extensions requesting unusual endpoint properties during publish, or generating Bicep for endpoints whose properties were not extended for Container Apps.","solutions":["Align all Aspire.Hosting.Azure.* package versions so the EndpointProperty enum is consistent","Avoid requesting unsupported endpoint properties for Container App endpoints; use a supported property (Host, Port, Scheme, etc.)","Upgrade to an Aspire version where the property you need is handled"],"exampleFix":"// before\nvar expr = envResource.GetEndpointPropertyExpression(endpoint, EndpointProperty.HttpsDisabled);\n// after\nvar expr = envResource.GetEndpointPropertyExpression(endpoint, EndpointProperty.Scheme);","handlingStrategy":"validation","validationCode":"var supported = new[] { EndpointProperty.Host, EndpointProperty.Port, EndpointProperty.TargetPort, EndpointProperty.Scheme, EndpointProperty.HostAndPort, EndpointProperty.TlsEnabled };\nif (!supported.Contains(property))\n{\n    throw new NotSupportedException($\"{property} is not supported for Container App endpoints\");\n}","typeGuard":null,"tryCatchPattern":"try { var expr = env.GetEndpointPropertyExpression(endpoint, property); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"not supported\"))\n{\n    logger.LogError(ex, \"Unsupported endpoint property {Property}\", property);\n}","preventionTips":["Only request documented endpoint properties on Container App endpoints","Keep all Azure.* package versions aligned so the enum matches handlers","Fall back to a supported property when available"],"tags":["azure","container-apps","endpoints","bicep"],"backgroundTag":"unsupported-operation","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"}