المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : WebClient/ Access Denied upon saving file...?



C# Programming
04-05-2009, 08:21 PM
Hi all! http://www.barakasoft.com/script/Forums/Images/smiley_biggrin.gif

I was just wondering how I could elevate privelages programmatically using C# as I am trying to download a file from my site and automatically save it to My Documents on my computer but I keep getting an exception and it says access to MyDocuments denied. Does anybody know how to get around this? It happens on both my XP and Vista computers. I don't want to turn off UAC or the *****elant in XP either? I'd appreciate any advice I can get. Thanks in advance.

Jay.

P.S. Incase anybody wants to know how to download files using WebClient, here's the code:

WebClient DownloadClient = new WebClient();
DownloadClient.DownloadFile(StartingPointTextBox.Text, SaveSessionTextBox.Text);

j.t.