Page with Directory Browsing enabled does not return file list, only 404 File not Found

StackOverflow https://stackoverflow.com/questions/17242954

Вопрос

I am trying to turn on Directory Browsing for a specific folder in my website, but no matter what I do the page always returns a 404 Page not Found.

Running IIS7 with a Kentico CMS7 site.

The folder location is www.sample.com/Public/FolderIWant

I can successfully access files within the FolderIWant, so an incorrect url is not the problem.

I have enabled Directory Browsing via IIS7 UI for the FolderIWant and disabled the Default Document feature along with deleting the default documents listed there. I have also enabled Directory Browsing on the Public folder as well with no luck.

Everything I have read online so far says that this is all that should have to be done to get Directory Browsing working for a folder.

Any help getting this to work would be greatly appreciated!

Это было полезно?

Решение

You have to put the "/Public/FolderIWant" directory into Kentico excluded URLs. It's done in CMS Site manager -> Settings -> select site -> URLs and SEO -> Excluded URLs. Otherwise the URL is treated as part of CMS content which is not found.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top