Article View: free.it.visual-basic
Article #671Classe WebClient (Download file)
From: Maurizio
Date: Mon, 29 Aug 2005 09:23
Date: Mon, 29 Aug 2005 09:23
20 lines
1731 bytes
1731 bytes
l'intenzione e' di usare il metodo Donloadfile della classe WebClient
per scaricare un file dal server Web al Pc locale
il problema e' che non da accesso al disco locale
System.UnauthorizedAccessException: Accesso al percorso
"C:\WINDOWS\system32\Libretto 03.pdf" negato , ma vale anche
per altri path non di sistema es: D:\
Dim myClient As New WebClient
Dim remoteuri, nomefile As String
Dim remotestring As String = Nothing
remoteuri = "http:\\www.sit<nomesito>\Volantino\"
nomefile = "Libretto 03.pdf"
remotestring = remoteuri + nomefile
myClient.DownloadFile(remotestring, nomefile)
grazie Maurizio
Technical Details
Message-ID:
<wuAQe.113936$fm.7549543@news4.tin.it>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed101.telia.com!nf02.dk.telia.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news-out.tin.it!news-in.tin.it!news4.tin.it.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f94ee,bb5fafbd49c8d390,start X-Google-Attributes: gidf94ee,public X-Google-Language: ITALIAN,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed101.telia.com!nf02.dk.telia.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news-out.tin.it!news-in.tin.it!news4.tin.it.POSTED!not-for-mail From: "Maurizio" <maurizio@virgilio.it> Newsgroups: free.it.visual-basic Subject: Classe WebClient (Download file) Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: <wuAQe.113936$fm.7549543@news4.tin.it> Date: Mon, 29 Aug 2005 09:23:40 GMT NNTP-Posting-Host: 82.50.149.175 X-Complaints-To: "Please send abuse reports to abuse@tin.it and technical notifications to newsmaster@tin.it" X-Trace: news4.tin.it 1125307420 82.50.149.175 (Mon, 29 Aug 2005 11:23:40 MET DST) NNTP-Posting-Date: Mon, 29 Aug 2005 11:23:40 MET DST Organization: TIN