79810200

Date: 2025-11-05 14:32:16
Score: 0.5
Natty:
Report link

I can't prove this, but I think Microsoft is trying to parse the <LoadUri> element too early. This "Invalid URI: The hostname could not be parsed." error message is a common exception that's thrown whenever you try to create a Uri with a bad hostname, which is true if I try to parse a value such as "https://{Claim:loadUri}". I feel like the parsing should have been done AFTER the {Claim:} tokens are resolved, but I don't know the reasoning behind it.

In short: I just couldn't do it and I had to redesign these dynamic URLs. I'm using a static url for use cases and I created a reverse proxy that routes to different destinations based off of the query string. They look like this now: <LoadUri>https://my-reverse-proxy.com?myClaim={Claim:MyClaim}</LoadUri>

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Guilherme Luiz