Constructs the URI from the configured URL parts.
the built URI.
if the host is not set or the port is not within the valid range.