webtechy
asked on
Dim f As New IO.FileInfo(FileFullPath) Return f.Exists [Gives false for file on a network)
Dear All,
I am doing:
Dim f As New IO.FileInfo(FileFullPath)
Return f.Exists
However, if:
FileFullPath = "\\COMPUTER_NAME\FOLDER\FI LENAME.PDF "
Which lets says exists on my network, I am getting f.Exists as false, although the machine I am running this on can open that file if I go to Start > Run. Is this a permissions thing? Do I need the ASP.Net account on this machine to have read access to the files on that server?
Any help much appreciated.
Thanks,
Ben.
I am doing:
Dim f As New IO.FileInfo(FileFullPath)
Return f.Exists
However, if:
FileFullPath = "\\COMPUTER_NAME\FOLDER\FI
Which lets says exists on my network, I am getting f.Exists as false, although the machine I am running this on can open that file if I go to Start > Run. Is this a permissions thing? Do I need the ASP.Net account on this machine to have read access to the files on that server?
Any help much appreciated.
Thanks,
Ben.
ASKER
The site is using Forms authentication.
I am running the site on my development machine, i.e. the IIS of the site is on my machine, however, the files are located in another machine.
I am running the site on my development machine, i.e. the IIS of the site is on my machine, however, the files are located in another machine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Depending on your security you will need to grant permissions to the FileFullPath as follows;
Application user's userid 'Needed if using impersonation...
\NetHost\aspnet ' Needed if using windows authentication
\\NetHost\IUSR_NetHost 'Needed if using anonymous authentication
Have Fun,
Dante