You need to assign permissions on the directory itself for the said user. I would also make the user(s) also sign in to hit the file. What kind of authentication method are you currently using? Keidrick Pettaway Web: http://www.kpettaway.com Twitter: http://twitter.com/kpett Linkedin: http://www.linkedin.com/pub/keidrick-pettaway/8/705/b58
-----Original Message----- From: Jamie Fraser <[email protected]> Date: Wed, 18 Nov 2009 11:25:15 To: <[email protected]> Subject: Re: [DotNetDevelopment] File.Copy IIS runs as a specific user. That user must have permissions on the file share. On Tue, Nov 17, 2009 at 11:49 AM, Pratiksha Saxena < [email protected]> wrote: > Hi, > > i have a web application in which on button_click i have written code for > File.Copy > > File.Copy(@"e:\Text.txt", @"\\okh-lb-labs-030\\D$\\MT\\Text.txt"); > > > but i gives error *Logon failure: unknown user name or bad password.* > * > * > *The files are in Intranet.* > Source is e:\Text.txt > Destination is \okh-lb-labs-030\\D$\\MT\\Text.txt > > If i copy on my local system it is fine but on network it gives error.i > tried even giving rights to MT folder but no use. > > Please help. > > Pratiksha >
