in my asp.net application, I would like to check to see if a file exist on an external server given the file address such as www.example.com/image.jpg. I tried File.exist and that does not seem to work. Thanks for any help.
3 Answers
One obvious answer I can think of is to issue a request for the resource, and then study the response code sent back to your application. The article found at http://madskristensen.net/post/Get-the-HTTP-status-code-from-a-URL.aspx has a concise example of how to do so.