G
Guest
Before you respond with "just use GetShortPathName" please read the rest.
We have an application that places files on a file server using mapped
drives as it's path of choice. The reason for this is because using a UNC
paths makes the path longer, causing the periodic problem with a path that is
too long (over 260 chars).
We also have an asp.net app that needs to access those files. Accessing
mapped drives from an IIS application is not a viable option due to security
restrictions. UNC paths, however, are good except for the long path problem.
I've tried using the GetShortPathName win32 api but it apparently doesn't
accept arguments that exceed 260 characters. Not really helpful. Sometimes
I can get around this by stripping the filename, shortening the directory
path, and then appending the filename back onto the path. However, this
won't work if the directory path is over 260 characters.
So what I need is a way to shorten a path that is over 260 characters, which
is where GetShortPathName doesn't work.
Can anyone offer any suggestions?
Thanks,
Jeff
We have an application that places files on a file server using mapped
drives as it's path of choice. The reason for this is because using a UNC
paths makes the path longer, causing the periodic problem with a path that is
too long (over 260 chars).
We also have an asp.net app that needs to access those files. Accessing
mapped drives from an IIS application is not a viable option due to security
restrictions. UNC paths, however, are good except for the long path problem.
I've tried using the GetShortPathName win32 api but it apparently doesn't
accept arguments that exceed 260 characters. Not really helpful. Sometimes
I can get around this by stripping the filename, shortening the directory
path, and then appending the filename back onto the path. However, this
won't work if the directory path is over 260 characters.
So what I need is a way to shorten a path that is over 260 characters, which
is where GetShortPathName doesn't work.
Can anyone offer any suggestions?
Thanks,
Jeff