You need to pass credentials for accessing the file. For example, use networkcredential and pass username and password of a sharepoint user of that site.
For checking purpose, try opening that url in internet explorer with the sharepoint user name and password, if it opens, the credentials are correct and modify your current code to use the credentials.
Otherway around is to use sharepoint webservice to download the document, but its the hard way and let me know if the above scenario does not work, we'll look into this one.
Happy Coding!