FileNotFoundException

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
 
B

bruce barker \(sqlwork.com\)

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top