That's because you can't open a directory handler resource across HTTP. If you visit the page in your web browser, you're not seeing a directory listing... you're seeing a simple HTML page outputted by IIS that's no different than any other .html file on your server.
To get a list of files... you might be able to parse the page's contents using regular expression. Other than that, I can't thnk of a reliable method (other than FTP or something like that).