The process cannot access the file \Portals\0\CKToolbar.xml

Nov 16, 2011 at 4:01 AM

Hello, i am having strange issue with CKEditor in DNN 4.9.4 - The+process+cannot+access+the+file+'D%3a\TMIMT\TmProjects\pepperidgefarm\web\Portals\0\CKToolbar.xml'+because+it+is+being+used+by+another+process.

I have used it the same way for many times, but can not figure out what is wrong.

Please, advise me on that issue.

Thank you

Nov 20, 2011 at 6:37 AM

When exactly is the Error thrown?

i had that error too once but i wasnt able to reproduce it.

And are you using the Latest Version of the Provider?

Nov 21, 2011 at 2:28 AM

Hello, thanks for reply.

I am using v1.12.17. I can see there is 1.12.18 already, but I will have to talk to my team if we should update our v. to the latest according to our QA policy now.

I don't know what is the original issue of that error - i had several projects with that version of CKEditor and none of them had such error. I tried to resolve it using source code and changed rights for sharing CKToolbar.xml in method from ToolbarUtil.cs from Read and Write to Read:

/// <summary>
        /// Get Toolbars from the Serialized Xml File
        /// </summary>
        /// <param name="sHomeDirPath">
        /// Current Portal Home directory
        /// </param>
        /// <param name="defaultToolbarFile">
        /// The default Toolbar File.
        /// </param>
        /// <returns>
        /// The Toolbar List
        /// </returns>
        internal static List<Toolbar> GetToolbars(string sHomeDirPath, string defaultToolbarFile)
            if (!File.Exists(Path.Combine(sHomeDirPath, "CKToolbar.xml")))
                CreateDefaultXml(sHomeDirPath, defaultToolbarFile);

            XmlSerializer serializer = new XmlSerializer(typeof(List<Toolbar>));
            //TextReader tr = new StreamReader(new FileStream(Path.Combine(sHomeDirPath, "CKToolbar.xml"), FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite));  here it is
            TextReader tr = new StreamReader(new FileStream(Path.Combine(sHomeDirPath, "CKToolbar.xml"), FileMode.Open, FileAccess.Read, FileShare.Read));

            List<Toolbar> toolBars = (List<Toolbar>)serializer.Deserialize(tr);


            return InsertMissingPrio(toolBars, sHomeDirPath);


And it seems to me that it worked. But I still worry about it, so if you have any idea about it, and about changes i have made, please, advice me.


Thank you

Nov 21, 2011 at 2:29 AM

sorry for the font, i copied the name of the the version and it seems that its style applied to the whole message

Nov 21, 2011 at 6:15 PM

Yes i think your code change is the solution to that problem. That Fix will be included in the next release.

P.S: If you don't use Secured Folders and don't use the "Download File" Function inside the FileBrowser of the Editor, you don't need to upgrade.