C# Webclient - Error 403

Discussion in 'Software' started by mastermosley, May 2, 2010.

  1. mastermosley

    mastermosley Sergeant

    I'm trying to download a file into a string off of the website. The website is just a blank page with a bunch of numbers seperated by commas which is viewable when I browse it using Mozilla but I get: The remote server returned an error (403 - Forbidden).

    Code:
    WebClient fetch = new WebClient();
    string file = fetch.DownloadString("http://website.com/data/file.html");
    
    How can I get around this, I no I dont require credentials because I can view it
    in my browser, but I do have FTP Access if I need it.
     
  2. mastermosley

    mastermosley Sergeant

    I realize it is a webhost issue, its solved by using a different webhost.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds