Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Limitation in the System.IO.FileInfo.get_Length()
Message
From
05/03/2010 05:27:01
 
 
To
05/03/2010 04:48:20
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01452685
Message ID:
01452706
Views:
44
This message has been marked as a message which has helped to the initial question of the thread.
>>Just guessing - but what is the total length of the full path to the file. Could that exceed 260 ?
>
>It gives 82 characters from the path + 160 at the file name. Up to that, it works. This is a total of 242. However, from the application, it is run under a share name. And, in that situation, yes, it would then fall over 260. So, that explains.
>
>But, I found that weird that once a hook as been establish to the file object that it will not run because of the path.
>
>Thanks

Interesting. And there's a way this can happen even without the share name: Although the OS won't let you copy a file into a folder if the combined length is too long there's nothing to prevent someone extending the length of the folder name *after* the file has been added.....

And you were right - the FileInfo returned for such a file is odd.
Length, as you found, throws a FileNotFound exception.
Name seems to work.
LastAccessTime doesn't throw an exception - but seems to return garbage....

Also, FWIW trying to open such an 'overlength' file in Notepad, for example, gives 'Access is denied'
Previous
Reply
Map
View

Click here to load this message in the networking platform