{"record":{"id":"6535371ae489d5e9","repo":"microsoft/aspire","slug":"resource-resource-name-does-not-have-an-external-http-or","errorCode":null,"errorMessage":"Resource '{resource.Name}' does not have an external HTTP or HTTPS endpoint. Azure Front Door requires an origin to expose an external HTTP or HTTPS endpoint. Call .WithExternalHttpEndpoints() on the resource before adding it as an origin.","messagePattern":"Resource '(.+?)' does not have an external HTTP or HTTPS endpoint\\. Azure Front Door requires an origin to expose an external HTTP or HTTPS endpoint\\. Call \\.WithExternalHttpEndpoints\\(\\) on the resource before adding it as an origin\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs","lineNumber":230,"sourceCode":"        }\n\n        throw new InvalidOperationException(\n            $\"Resource '{resource.Name}' does not have a compute environment. \" +\n            \"Ensure a compute environment (e.g., Azure Container Apps, Azure App Service) is configured in the application model.\");\n    }\n\n    private static EndpointReference GetOriginEndpoint(IResourceWithEndpoints resource)\n    {\n        var externalHttpEndpoint = resource.GetEndpoints()\n            .Where(e => e.EndpointAnnotation.UriScheme is \"http\" or \"https\")\n            .FirstOrDefault(e => e.EndpointAnnotation.IsExternal);\n\n        if (externalHttpEndpoint is not null)\n        {\n            return externalHttpEndpoint;\n        }\n\n        throw new InvalidOperationException(\n            $\"Resource '{resource.Name}' does not have an external HTTP or HTTPS endpoint. \" +\n            \"Azure Front Door requires an origin to expose an external HTTP or HTTPS endpoint. \" +\n            \"Call .WithExternalHttpEndpoints() on the resource before adding it as an origin.\");\n    }\n\n    private static (string Path, HealthProbeProtocol Protocol) GetProbeSettings(IResourceWithEndpoints resource)\n    {\n        // Use settings from EndpointProbeAnnotation if available (set by WithHttpProbe).\n        // Prefer liveness probes, matching the pattern used by App Service.\n        var probeAnnotation = resource.Annotations\n            .OfType<EndpointProbeAnnotation>()\n            .OrderBy(p => p.Type == ProbeType.Liveness ? 0 : 1)\n            .FirstOrDefault();\n\n        if (probeAnnotation is not null)\n        {\n            var protocol = probeAnnotation.EndpointReference.Scheme == \"http\"\n                ? HealthProbeProtocol.Http","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.Azure.FrontDoor/AzureFrontDoorExtensions.cs#L212-L248","documentation":"Azure Front Door origins must expose an HTTP or HTTPS endpoint that is marked external. GetOriginEndpoint looks for an external HTTP/HTTPS endpoint annotation on the origin resource and throws this InvalidOperationException when none exists, telling the developer to call WithExternalHttpEndpoints(). This guarantees Front Door has a routable public endpoint for the origin.","triggerScenarios":"Passing a resource to FrontDoor AddOrigin that has no endpoints, or whose endpoints are all internal/non-HTTP (e.g., default project endpoints, or endpoints added without the external HTTP flags).","commonSituations":"Adding a project that only listens on internal endpoints; forgetting .WithExternalHttpEndpoints() on the backend service; using a container with only a TCP or gRPC endpoint as an origin.","solutions":["Call .WithExternalHttpEndpoints() on the origin resource before adding it to the Front Door.","Ensure the endpoint is HTTP or HTTPS (not another scheme) and marked external.","If the resource should not be publicly exposed, expose a dedicated front-end project instead of the internal service."],"exampleFix":"// before\nfrontDoor.AddOrigin(builder.AddProject<Projects.Frontend>(\"frontend\"));\n\n// after\nvar frontend = builder.AddProject<Projects.Frontend>(\"frontend\")\n    .WithExternalHttpEndpoints();\nfrontDoor.AddOrigin(frontend);","handlingStrategy":"validation","validationCode":"var ok = resource.TryGetEndpoints(out var endpoints) && endpoints.Any(e => e.Endpoint?.IsExternal == true && e.Endpoint.UriScheme is \"http\" or \"https\");","typeGuard":"static bool HasExternalHttpEndpoint(IResourceWithEndpoints r) => r.TryGetEndpoints(out var eps) && eps.Any(e => e.Endpoint?.IsExternal == true && e.Endpoint.UriScheme is \"http\" or \"https\");","tryCatchPattern":"try { frontDoor.AddOrigin(resource); } catch (InvalidOperationException ex) when (ex.Message.Contains(\"external HTTP\")) { /* call WithExternalHttpEndpoints on the resource */ }","preventionTips":["Chain .WithExternalHttpEndpoints() on every service used as a Front Door origin.","Confirm the endpoint scheme is http/https and external.","Review endpoint configuration before publishing."],"tags":["aspire","azure-frontdoor","endpoints","publish-time"],"backgroundTag":"missing-required-config","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"}