Re: File.Copy
- From: christery@xxxxxxxxx
- Date: Sat, 24 Nov 2007 19:13:55 -0800 (PST)
On 24 Nov, 10:01, Peter Duniho <NpOeStPe...@xxxxxxxxxxxxxxxx> wrote:
On 2007-11-24 00:18:12 -0800, r...@xxxxxxxxxxx said:
Hello,
Can anyone help with this?
I am using C# with IIS 6.0 on Windows 2003 Server. I am trying to copy
a file over the network. It is attempting to copy a file on a NAS
(external hard drive), which is Linux based. I have already set the
permission on the NAS and I can copy files manually without any
problem. If I run the same code on IIS 5.1 on Windows XP on the same
network, it works!
When you are testing it on the other system, are you using the same
exact user ID and password?
The exception looks like a straight permissions problem. Windows file
security can be kind of quirky, so it's hard to say exactly without
more information what a precise solution to a permissions problem would
be (depending on the configuration of the network, you might need to
have an exact NT domain account, or just log in with the right username
and password, or provide the necessary credentials via "net use",
or...).
But as a general rule, if you've got a system from which you can access
the file, and one from which you can't, it's possible that you're just
using different credentials on each system. Use the same working set
of credentials on both, and it should work.
Of course, this means it doesn't really have anything to do with the C#
code per se. But close enough. :)
Pete
Nope, imho u are providing the poor machine an URL.... llose the @ or
format the code correct
In the context of strings, the @ symbol is used to create verbatim
string literals. The @ symbol tells the string constructor to use the
string literal that follows it "literally"--even if it includes escape
characters or spans multiple lines.
This comes in handy when working with directory paths (without the @,
you would have to double each backslash). For example, the following
two strings are equivalent:
string noat = "\\\\BIGSERVER\\C";
string withat = @"\\BIGSERVER\C";
//CY
.
- Follow-Ups:
- Re: File.Copy
- From: christery
- Re: File.Copy
- References:
- File.Copy
- From: rgw1
- Re: File.Copy
- From: Peter Duniho
- File.Copy
- Prev by Date: Re: update query in ms-access doesn't working
- Next by Date: Re: No memo control in C#
- Previous by thread: Re: File.Copy
- Next by thread: Re: File.Copy
- Index(es):
Relevant Pages
|