Alright so I've been playing around with various blocks of code from around the web and I can't seem to get this to work :(
Note I am not that skilled in programming in C# however I do have quite a bit of knowledge.
Okay so basically what I want to do is download a file from rapidshare using my premium account, and it seems to work fine, untill you try to open the file.
After the download, I attempt opening the file and it always gives me this error:
"The NTVDM CPU has encountered an illegal instruction.
CS:05a IP:fffe OP:ff ff 00 00 00 Choose 'Close' to terminate the application."
Now the title of this popup us "16 bit MS-DOS Subsystem", so I'm assuming the file i've download is being regarded as being 16 bit. It isn't though, it's actually a small program that I made earlier this year.
Here is the chunk of code that I'm using to perform the download:
private void downloadFile()
{
string url
= @"http://rapidshare.com/files/412151386/GE_Item_Finder.exe";
WebClient client = new WebClient();
client.Credentials = new NetworkCredential("username", "password");
client.DownloadFileCompleted +=
new AsyncCompletedEventHandler(client_DownloadFileCompleted);
Uri fileUri = new Uri(url);
client.DownloadFile(fileUri, "C:\\Temp\\" + Path.GetFileName(url));
}
void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
{
MessageBox.Show("File downloaded");
}
Well that's it, if anybody could please tell me what I'm doing wrong, and perhaps offer a solution to my problem, it would be of great use.
Thanks in advance :)
- Raz