Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > FileNotFoundException

Reply
Thread Tools

FileNotFoundException

 
 
Luigi
Guest
Posts: n/a
 
      09-20-2006
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

 
Reply With Quote
 
 
 
 
bruce barker \(sqlwork.com\)
Guest
Posts: n/a
 
      09-20-2006
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)

"Luigi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.IO.FileNotFoundException, When Accessing file in remote ser =?Utf-8?B?UmFqYQ==?= ASP .Net 2 09-24-2004 05:34 PM
System.IO.FileNotFoundException: File or assembly name xlq0jgak.dll, or one of its dependencies, was not found. Martinh ASP .Net 0 08-15-2004 04:30 PM
System.IO.FileNotFoundException help msnews.microsoft.com ASP .Net 2 06-03-2004 03:45 AM
System.IO.FileNotFoundException using file.copy Stephen Witter ASP .Net 2 05-28-2004 08:20 PM
Loading a deployed Assembly - System.IO.FileNotFoundException Brian ASP .Net 1 12-05-2003 07:30 PM



Advertisments