I’m having an unexpected behavior with the System.Uri class.
When an instance of System.Uri is created, and the UrlString has some patterns like ..., or ...#, or .#, the System.Uri removes all repeated . characters.
This is weird, but I believe this behavior is based on RFC 2396.
The problem begins when I try to download the HTML from this URL: http://www.submarino.com.br/produto/1/23853463/mundo+segundo+steve+jobs,+o:+as+frases+mais+inspiradoras+…
and the System.Uri removes all the repeated .s. As the web site doesn’t recognize the “New URL,” it redirects to the rriginal URL. Then a “System.Net.WebException: Too many automatic redirections were attempted” is thrown and the page is never reached.
How can I solve this issue?
You can use reflection to remove that particular attribute. Use this before your
Uricall:It has been reported to Connect before.