Я установил CKFinder из NuGET на своем веб-сайте ASP.NET 4.7 WEB Forms.Я настроил веб-конфигурацию, добавив следующие ключи в appsettings:
<add key="ckfinderAllowedRole" value="*" />
<add key="ckfinderRoute" value="/ckfinder/connector" />
(на данный момент я не настроил никакой аутентификатор)
В web.config у меня естьтакже следующий раздел конфигурации для ckfinder:
<ckfinder overwriteOnUpload="false" checkDoubleExtension="true" disallowUnsafeCharacters="false" secureImageUploads="true" checkSizeAfterScaling="true" xmlns="https://cksource.com/ckfinder-net/schema/CKFinderConnector.xsd">
<license name="" key="" />
<images maxWidth="1600" maxHeight="1200" quality="80">
<sizes>
<size name="small" width="480" height="320" quality="80" />
<size name="medium" width="600" height="480" quality="80" />
<size name="large" width="800" height="600" quality="80" />
</sizes>
<threshold pixels="80" percent="10" />
</images>
<thumbnails folder="thumbs" backend="CKFinderPrivate">
<sizes>
<size width="150" height="150" quality="80" />
<size width="300" height="300" quality="80" />
<size width="500" height="500" quality="80" />
</sizes>
</thumbnails>
<backends>
<!--
This is special file system for private CKFinder data, it shouldn't be used for normal files.
It shouldn't be modified unless CKFinder is hosted without access to the local file system.
-->
<backend name="CKFinderPrivate" adapter="local">
<option name="root" value="App_Data" />
</backend>
<backend name="default" adapter="local">
<option name="root" value="E:\myprojects\mywebsite\DefaultContents" />
<option name="baseUrl" value="/DefaultContents/" />
</backend>
</backends>
<resourceTypes>
<resourceType name="Files" folder="files" allowedExtensions="7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip" backend="default" />
<resourceType name="Images" folder="images" allowedExtensions="bmp,gif,jpeg,jpg,png" backend="default" />
</resourceTypes>
<accessControl>
<role name="*" resourceType="*" folder="*" folderView="allow" folderCreate="allow" folderRename="allow" folderDelete="allow" fileView="allow" fileUpload="allow" fileRename="allow" fileDelete="allow" imageResize="allow" imageResizeCustom="allow" />
</accessControl>
<htmlExtensions>
<extension name="html" />
<extension name="htm" />
<extension name="xml" />
<extension name="js" />
</htmlExtensions>
<hideFolders>
<folder name=".*" />
<folder name="CVS" />
<folder name="__thumbs" />
</hideFolders>
<hideFiles>
<file name=".*" />
</hideFiles>
<plugins folder="plugins">
<!--
<plugin name="PluginName" />
-->
</plugins>
, где я изменил только следующие параметры:
<backend name="default" adapter="local">
<option name="root" value="E:\myprojects\mywebsite\DefaultContents" />
<option name="baseUrl" value="/DefaultContents/" />
</backend>
где E: \ myprojects \ mywebsite \DefaultContents - это папка, в которой я хочу хранить файлы.
при просмотре http://localhost:50393/CKFinderScripts/samples/full-page-open.html я получаю 404 :
Ресурс, который выискомый объект был удален, изменилось его имя или временно недоступен.
Requested URL http://localhost:50393/ckfinder/connector?command=GetFolders&lang=it
Physical Path E:\myproject\mywebsite\ckfinder\connector
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
, поэтому он не может найти что-либо на этом маршруте.Должен ли я настроить что-то еще, чтобы оно работало?
Я запускаю его локально из VS