473,386 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

DownloadFile give Acccess Denied when administrative share used

Hi, all. I have a networking question, really. I have this line of code:

my.computer.network.downloadfile("\\1.2.3.4\c$\fil e.txt", "c:\ifle.txt",
"user", "pass")

When I run it, I get an access denied error from the framework.

If I go to the run menu on my workstation, and type:

\\1.2.3.4\c$\

And type in my credentials in the network dialog box, THEN run my code, it
works.

Now, in a certain way this makes sense. I just don't understand totally how
DownloadFile is coded under the sheets, and I probably need to use the
System.Net classes to pass the credentials a different way.

But if someone could give me a heads up as to how, I would appreciate it.

Thanks!

S
Aug 24 '06 #1
2 1601
"Bill Sempf" <se***@newsgroups.nospanschrieb:
I have a networking question, really. I have this line of code:

my.computer.network.downloadfile("\\1.2.3.4\c$\fil e.txt", "c:\ifle.txt",
"user", "pass")

When I run it, I get an access denied error from the framework.
Did you already try 'File.Copy'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Aug 24 '06 #2


"Herfried K. Wagner [MVP]" wrote:
"Bill Sempf" <se***@newsgroups.nospanschrieb:
I have a networking question, really. I have this line of code:

my.computer.network.downloadfile("\\1.2.3.4\c$\fil e.txt", "c:\ifle.txt",
"user", "pass")

When I run it, I get an access denied error from the framework.

Did you already try 'File.Copy'?
Where in File.Copy would I pass in the credentials?
Aug 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Marc Walgren | last post by:
Greetings I have an ASP application to enter reservations. There are multiple user security settings that require some users to have a restricted list of client in a drop list on a form. I...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
1
by: Cheri Elkin | last post by:
I recieve the following error when attempting to download a file from our web server to be placed on our hard drive. Any clues as to why I would get this error? By the way, the directory already...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
8
by: DEWright_CA | last post by:
Why does WebClient.DownloadFile loose my completed path? Ok, I have a function in my app then when my button is clicked it checks to see if the files come from a local drive or a http address....
4
by: vvenk | last post by:
Hello: I have an ASP application that takes a file and parses it. I have a fileUpload control on my ASP page. Here's the code that gets file details: Dim srFile As StreamReader Try srFile...
3
by: Simon | last post by:
Hi All, I'm hoping someone will have some words of wisdom for me regarding MS Clustering on Windows 2003. I have a service that runs on a cluster. During invocation it's supposed to...
1
by: cpajoe2001 | last post by:
I am having an issue and after searching around online for a day and half now and finding others with the same problem but yet no solution to my issue I am looking for help. What i have is ServerA...
5
by: Tim Peer | last post by:
I am getting a dreaded Access To Path <fileis denied in a C# program. I tried granting full access to ASPNET (local machine), the user running the program (a domain administrator) and continue to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.