FileNotFoundException

  • Thread starter Thread starter Luigi
  • Start date Start date
L

Luigi

Hi all,
I have a problem with my asp.net application.
I can't read a file that is on another server (10.1.8.15), while my
application in on 10.1.8.14.
In that file I have a shared folder, within the file "txt".
I've used the following code:

bool present;
FileInfo f1 = new FileInfo(@"\\10.1.8.15\CDG\CDG_CD.txt");
if (f1.Exists)
{ present = true; }
else
{lblError.Text += ". Missing file " + f1.ToString();}

but always says me that the file does not exist
(FileNotFoundExcpetion).
If I run the command \\10.1.8.15\CDG\CDG_CD.txt from Start - Run, I can
see the file.
What's the problem?

Thanks a lot.

Luigi
 
by default the asp.net account does not have network access. change the
account to a domin account. if you ar on 2003 set the app pool identity to a
domain account with access to the share.

-- bruce (sqlwork.com)
 
Back
Top