.net reportviewer control crashes with "invalid URI. hostname could not be parsed"

Jan-Frederik Carl 1 Reputation point
2022-02-15T14:19:21.587+00:00

I am wrestling with a legacy .net webforms application that contains a reportviewer control and throws an error in our production environment.

The report server and report is accessible and the control works somewhere else in the same application(!), so it shouldn't be a permission issue.

But in this particular situation, the control throws the error "invalid URI. hostname could not be parsed". Has anybody observed this error and can throw light on it?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,918 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Joyzhao-MSFT 15,581 Reputation points
    2022-02-16T01:49:32.597+00:00

    Hi @Jan-Frederik Carl ,

    invalid URI. hostname could not be parsed

    1. Please check this, and here is a link http://www.december.com/html/spec/esccodes.html about the list of escape codes. Transfore some characters rightly with Replace function as:Replace(Fields!<name>.Value,”-“,”.”)
    2. Make sure they had '\' instead of '/' in urls.
    3. open your rsreportserver.config file. if you find the "UrlRoot" tag is as below, <UrlRoot>http://+:80</UrlRoot>
      please remove http://+:80 out.
      use <UrlRoot></UrlRoot> only

    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.