Environment Description
The environments used are vs2010,. net4.0, XP, ie8.0, ckeditor. Net 3.6.2, and ckfinder2.1.1.
File preparation
Copy the ckeditor directory under the ckeditor _ sample directory to the website root directory.
Copy the ckfinderdirectory and delete the _ sampledirectory, _source, binand .txt files.
AdjustmentCode
Adjust the code in the sendresponse method in ckfinder and fileuploadcommandhandler. CS.
Httppostedfile ofile = httpcontext. Current. Request. Files [httpcontext. Current. Request. Files. allkeys [0];
Change to -->
If (httpcontext. Current. Request. Files. Count <= 0) return;
Httppostedfile ofile = httpcontext. Current. Request. Files [0];
Because this old error is reported, it is sometimes caused by the empty set of files after the endpoint.
Configuration Integration
Reference ckeditor. net. dll and ckfinder. dll, and add ckeditor to the toolbox.
Add the following code to page initialization (generally page_load) to enable the file upload function of ckeditor.
Ckfinder. filebrowser _ filebrowser = new ckfinder. filebrowser ();
_ Filebrowser. basepath = "/ckfinder /";
_ Filebrowser. setupckeditor (ckeditor1 );