0

I'm creating a Kentico media library file using Kentico API 11.0.26. The CMS and MVC app are on a web farm. Both are in healthy state.

The file gets created fine, but is only accessible on the CMS application, not on the MVC website. This is true for both Direct Path link as well we Permanent link.

Copying/pasting the Permanent link in browser preceded with MVC domain gives this message: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

Can someone explain what "same UNC root defined " means in this section:

If you are running the system on a web farm and have the same UNC root defined on all servers, it is necessary to add the following key into your web.config file. The files stored in the libraries are then not transferred when synchronizing the web farm content:

<add key="CMSWebFarmSynchronizeMediaFiles" value="false"/>

https://docs.kentico.com/k12/configuring-kentico/configuring-the-environment-for-content-editors/configuring-media-libraries

1 Answer 1

-1

The UNC (Universal naming convention) is the standard for identifying a server/machine on a network, used like so: \\server-name\rest of path

In Kentico, you would be using UNC to tell Kentico where you're storing media library files if it's on a different server in the network.

The first thing that came to mind why you're getting a 404 is it's probably that the media URL has a tilde (~) preceding it. If that's the case, remove that tilde and see if the problem is resolved. Personally, I do a replace like so:

MediaLibraryHelper.GetPermanentUrl(mediaLibraryFile).Replace("~/", "/")

I'm not aware if there's a helper function to give you a URL without string replacing the tilde.

2
  • Maybe the document can be updated to clarify/distinguish Azure app service portals because there is no UNC there - like in our case both CMS and MVC are Azure app services. Also - just for testing I'm simply copying pasting the Direct Path as well as Permanent Link in the browser, preceded with MVC domain. And it gives 404.
    – joym8
    Commented Jan 24, 2020 at 14:34
  • Not trying to access via API. Only copying from Kentico CMS and pasting the link in browser. No tilde involved. Replacing Kentico domain with MVC domain when pasting.
    – joym8
    Commented Jan 28, 2020 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.