These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

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
Hi Leandros,
Yes, there seems to be a problem when using Direct Link feature witinin dynamic root folders (root folders which include {user.name} placeholder), this will be fixed in v4.1
Cem Alacayir 10/6/2010 5:57 AM
Hi Cem,

Thanks. Let me know when v4.1 is being released.

Kind regards,
Leandros van den Berg 10/6/2010 6:04 AM
FYI, we have just released v4.1 which fixes this problem:

- Fixed: When creating direct links within dynamic root folders (ie. root folders which include {user.name} placeholder in path), the path was not resolved correctly thus "resource not found" error was being generated.
Cem Alacayir 11/8/2010 9:59 AM
Hi Cem,

I’m running into some trouble updating version 4.0 to 4.1 with the msi-installer. After some testing I found out that the column MaximumMembers was added to the Group table and column DirectLink was added to the AccessControl table so I added these manually before running the installer. After the update all seems well but when I try to great a DirectLink I get a message from the webpage saying:

“The given key was not present in the dictionary.”

I tried opening/saving web.config to force restarting the application, restarting the web-server and restarting the application-pool, all to no avail. When I do a clean install of 4.1 this message doesn’t show up.

Do you have an idea what might be the cause of this message and how can I fix this?

King regards,
Leandros van den Berg 6/23/2011 7:14 AM
I forgot to mention that the DirectLink is written to the database regardless of the message and it does work so {user.name} is resolved correctly.
Leandros van den Berg 6/23/2011 7:27 AM
Please only follow these instructions when updating your versions:
How to manually upgrade an existing installation of FileVista.

The update wizard will automatically do the necessary changes to the database so you should not do any manual changes before the the update. You should have your original (untouched) v4.0 database before running update.aspx.
Cem Alacayir 6/23/2011 8:24 AM
Hi Cem,

The manual update procedure worked like a charm. Thanks for the quick response.
Leandros van den Berg 6/24/2011 12:40 AM