The HTML of most web pages requires the loading of other files, such as images, JSON, CSS, JavaScript, etc. These are dependent queries. Visual Studio validates HTML to find many dependent queries. All must be valid URLs. Visual Studio code retrieving these dependent requests is less simple than many browsers. Visual Studio requires them to be valid URLs. Many real browsers do their best to deal with bad HTML so that something reasonable can be displayed.
The reason for the exception is probably the wrong HTML format in the response. Some browsers have tools for developers who will describe errors found in the downloaded html. Verify that these developer tools report errors on the page; it might be worth trying several browsers to get different page ratings.
One example: an incorrectly formed base tag can result in the exception you are reporting.
When you view the web test execution log for a successful request, you will see a list of dependent requests. Visual Studio seems to βtrustβ that these requests form valid URLs, that is, they are formatted correctly. Your test has a poorly formatted URL. If you specified a correctly formatted URL, but there was no resource, you would see a dependent request and receive a 404 error. This is an extreme case, and you can argue that Visual Studio should report it differently.
By "web test execution log" I mean a way to display the results of a web test. This is a tabular form with column headings: Request + Status + Total Time + Request Time + Request Bytes + Response Bytes. Below are tabs that display information about the selected item, tabs are marked as Web browser + Request + Response + Context + Details. If you click on the small triangles on the left side of the Query column, you will see redirects and dependent queries. (Note that the logs for web tests run as part of the load test, omitting the dependent details of the request)
source share