Resource cannot be found for Direct Links created by a normal user

Dear Cem,

Testing a Direct Link created by a normal user results in this error:

"The resource that was linked to, cannot be found or no longer exists. The link owner may have deleted or moved the target resource.  
Please contact the link owner for more information."

However, when I create a Direct Link to the same file as an Administrator I get no error and the download dialog appears.

I'm using IIS 6 and link.ashx is used in the Direct Link. The 'wildcard application mapping' and 'Fix 2 for FileVista v4.0' solutions provided in posting http://www.gleamtech.com/support/forums/4134/direct-links-returning-404-errors did not work for me.

I looked at the database (MicroSoft SQL Server 2008 Express) and the Subfolder field in table DirectLink is empty for those Direct Links created by a normal user.

Do you have an idea what might be the problem?

Kind regards
Leandros van den Berg 7/23/2010 6:48 AM
Direct Link handling is working so you don't need to apply any fixes.

The error means the file that the direct link points to, does not exist in the same location. So it's either deleted or moved to another folder. The direct link entry is found in the database so there are no problems with saving direct link. Subfolder field would be empty if the direct link is created at the root level, this is ok.

So please check the existence of the linked file, if it exists please check if it's inaccessible due to permission problems.
Cem Alacayir 7/23/2010 6:59 AM
The linked file does exist and it resides in <drive:>\root\{user.name}\folder so the Direct Link is not created at the root level. Field Subfolder is not empty for Direct Links created by an Administrator, it contains {user.name}/folder.
Leandros van den Berg 7/23/2010 7:12 AM
Hello Cem,

I still wasn't able to solve this problem. I need users to be able to make their own working Direct Links that work.

Kind regards
Leandros van den Berg 8/6/2010 5:22 AM
bump
Leandros van den Berg 8/17/2010 2:30 AM
Hi Cem,

This is my setup:

Name:    Path:
folder1    <location>/{user.name}/folder1
folder2    <location>/{user.name}/folder2
folder3    <location>/{user.name}/folder3

Each folder has different access control settings via groups. As user 'user1' I want to create a direct link to file1.txt in folder1. 
Looking at the source code of the page after I pressed 'Direct Link...', the link in the title shows an empty relativePath argument:

editdirectlink.aspx?rootFolderID=0&relativePath=&fileName=file1.txt

Logged on as an Administrator, relativePath is not empty and that same link looks like this:

editdirectlink.aspx?rootFolderID=0&relativePath=user1%2Ffolder1&fileName=file1.txt

I've done some testing and it only seems to works when I add folder

Name:          Path:
{user.name} <location>/{user.name}

and grant users permissions to this folder. But then I'm having trouble setting the different access control settings.

It seems there is a problem with determining relativePath when there is no folder tree-structure.

Kind regards
Leandros van den Berg 8/17/2010 8:55 AM