Troubleshooting"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(Created page with '== Debugging == When installing and configuring CKFinder, sometimes it may happen that for unknown reason CKFinder doesn't work as expected, for example it returns an error abou…')
 
(Added Flash Upload Problem section)
Line 19: Line 19:
  
 
'''Warning:''' it is not recommended to run production ASP.NET applications with debug mode enabled.
 
'''Warning:''' it is not recommended to run production ASP.NET applications with debug mode enabled.
 +
 +
==Flash Upload Problem==
 +
 +
{{Template:Flash Upload Problem}}
 +
 +
To workaround this problem we have created a dedicated HTTP module named <code>FixFlashCookies</code> which  retrieves appropriate cookies on server side. So if you are using flash upload component together with session scope variables to identify your user, make sure this module is enabled in <code>web.config</code>.
 +
 +
<source lang="xml">
 +
<httpModules>
 +
    <add name="FixFlashCookies" type="CKFinder.Utils.FixFlashCookiesModule" />
 +
</httpModules>
 +
</source>
 +
 +
Alternatively, enabling cookieless in the <code>web.config</code> should solve this issue in most cases as well:
 +
<source lang="xml">
 +
<system.web>
 +
  <sessionState cookieless="true" />
 +
</system.web>
 +
</source>
  
 
== Disabling FCN ==
 
== Disabling FCN ==

Revision as of 19:52, 13 September 2011

Debugging

When installing and configuring CKFinder, sometimes it may happen that for unknown reason CKFinder doesn't work as expected, for example it returns an error about insufficient permissions ("It was not possible to complete the request due to file system permission restrictions."). In such case it might be more usable to run the debug version of server connector to find out what's the problem.

web.config

To use CKFinder for ASP.NET in debug mode, add <compilation debug="false"/> to the web.config.

<system.web>
<compilation debug="true" />
</system.web>

CKFinder.dll

Apart from setting compilation element, the debug version of CKFinder binaries: CKFinder.dll and CKFinder.pdb should be copied to the "bin" directory of ASP.NET application. Both files are available in the ckfinder/bin/Debug directory.


When debugging problems with file uploads, using a tool to trace HTTP connections, like Fiddler, might be helpful.

Warning: it is not recommended to run production ASP.NET applications with debug mode enabled.

Flash Upload Problem

Note: the flash upload component has been completely removed in CKFinder 2.6.

As of CKFinder 2.1 we have introduced a new Flash component for multiple file upload. It is working great except in one situation. When you use your own authentication method in CKFinder (you have overridden the checkAuthentication() method), based on a variable placed in the session scope, in browsers other than Internet Explorer you might see the following error while trying to upload images: "The file browser is disabled for security reasons. Please contact your system administrator and check the CKFinder configuration file".

CKFinder Flash Upload Problem


This is happening because of an old Flash "cookie bug". If you are interested in seeing reports on this issue you can follow the links below (login is required):

To sum up the problem: as you probably know, the browser has a cookie space which is designed to store cookies that are used for the communication with the server. When the Flash component (embedded in the Web page) is being initialized, it creates its own separate cookie space in non-IE browsers from which unfortunately wrong or no cookies are sent. If correct cookies are not sent, sessions and cookie-based authentication will not work.

To workaround this problem we have created a dedicated HTTP module named FixFlashCookies which retrieves appropriate cookies on server side. So if you are using flash upload component together with session scope variables to identify your user, make sure this module is enabled in web.config.

<httpModules>
    <add name="FixFlashCookies" type="CKFinder.Utils.FixFlashCookiesModule" />
</httpModules>

Alternatively, enabling cookieless in the web.config should solve this issue in most cases as well:

<system.web>
  <sessionState cookieless="true" />
</system.web>

Disabling FCN

When File Change Notifications (FCN) are turned on, session state may be lost after deleting a subfolder. See this blog post on msdn to find out more about this issue. This might be a problem when using CKFinder, i.e. user might be automatically logged out after deleting a folder.

A resolution for this problem (apart from suggestions in the blog post mentioned above) is using a special HTTP module that disables FCN provided with CKFinder, named StopAppDomainRestartModule. To enable this module, add the following to web.config inside the <system.web> element:

<httpModules>
<add name="StopAppRestartOnFolderDelete" type="CKFinder.Utils.StopAppDomainRestartModule" />
</httpModules>

Note: this solution will not work in medium trust environment.