Search code examples
iishttp-request

503 error code testing


that would test the availability of certain image on the server to find out, whether the server where the image is located is ok or not.

I am interesting in catching 503 error code as a webexception. I would like to ask you what happens if the image won't be located on the server (404) and the service wouldn't be also available? Does it make sense to test also the 404?


Solution

  • I found out, that after error 503 you cannot get the 404. So if there are both 404 and 503 errors, you will see only the 503. Therefore, there is no reason to test for 404 after 503.