Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: FCKeditor: System.Security.Permissions.SecurityPermission

  1. #1
    Join Date
    Sep 2006
    Posts
    210
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default FCKeditor: System.Security.Permissions.SecurityPermission

    Hi All

    can anyone give me any idea what the FckEditorV2 is trying to do that is causing this exception, it works fine on my dev server but when uploaded to RFH it throws this exception when I try and browse to Folders or Create a folder.

    Message
    System.Security.Permissions.SecurityPermission

    Source
    FredCK.FCKeditorV2

    Target site
    System.IO.DirectoryInfo CreateDirectory(System.String)

    Stack trace
    at FredCK.FCKeditorV2.Util.CreateDirectory(String path) at FredCK.FCKeditorV2.FileBrowserConnector.ServerMapF older(String resourceType, String folderPath) at FredCK.FCKeditorV2.FileBrowserConnector.GetFolders (XmlNode connectorNode, String resourceType, String currentFolder) at FredCK.FCKeditorV2.FileBrowserConnector.OnLoad(Eve ntArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.admin_fckeditor_2_3b_editor_filemanager_browse r_default_connectors_aspx_connector_aspx.ProcessRe quest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e() at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)

    ToString()
    System.Security.SecurityException: System.Security.Permissions.SecurityPermission at FredCK.FCKeditorV2.Util.CreateDirectory(String path) at FredCK.FCKeditorV2.FileBrowserConnector.ServerMapF older(String resourceType, String folderPath) at FredCK.FCKeditorV2.FileBrowserConnector.GetFolders (XmlNode connectorNode, String resourceType, String currentFolder) at FredCK.FCKeditorV2.FileBrowserConnector.OnLoad(Eve ntArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.admin_fckeditor_2_3b_editor_filemanager_browse r_default_connectors_aspx_connector_aspx.ProcessRe quest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e() at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) The type of the first permission that failed was: System.Security.Permissions.SecurityPermission The Zone of the assembly that failed was: MyComputer

  2. #2
    Join Date
    Mar 2005
    Location
    Hampshire
    Posts
    432
    Thanks
    4
    Thanked 3 Times in 3 Posts

    Default

    I think that FckEditor may be in the GAC. Try it without it in your Bin directory and see if it works. Since if the DLL is in your Bin directory it will use that one over the one in the GAC. And the one in the GAC will have more permissions.

    Just chill

  3. #3
    Join Date
    Sep 2006
    Posts
    210
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default

    Hi

    Tried that and it did not work, not to hot on the Gac do I need to do anything to the application, like some import statments or anything.

  4. #4
    Join Date
    Mar 2005
    Location
    Hampshire
    Posts
    432
    Thanks
    4
    Thanked 3 Times in 3 Posts

    Default

    So far as I remember you don't need to do anything special to use something that is in the GAC. Hopefully, Warren will be able to help you out. I've not used the FckEditor appart from within DNN and it works fine in that.

    Just chill

  5. #5
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Is or has Frontpage Extensions been installed on this domain?
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  6. #6
    Join Date
    Sep 2006
    Posts
    210
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default

    No never been installed

  7. #7
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    Quote Originally Posted by spire128 View Post
    No never been installed
    OK - Open a support ticket and I'll take a look for you.
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  8. #8
    Join Date
    Feb 2004
    Posts
    4,903
    Thanks
    2
    Thanked 134 Times in 113 Posts

    Default

    FCKeditor has shocking code that prevents it from running fully under Medium Trust:

    Code:
    // The "_mkdir" function is used by the "CreateDirectory" method.
    [DllImport("msvcrt.dll", SetLastError=true)]
    private static extern int _mkdir(string path) ;
    As many of you know, unmanaged code (from imported DLLs) is a big no no under Medium Trust; why FCKeditor uses this instead of .NETs own directory creating functions I have no idea.

    Anyway, the fix is simple - change anything that calls _mkdir to use .NETs own functions.
    Warren Ashcroft
    Red Fox UK Limited - Pioneers in Internet Technology
    http://www.redfoxuk.com
    w.ashcroft [at] redfoxuk.com

    NOTE: Forum Private Messaging should not be used to contact staff with support queries.

  9. #9
    Join Date
    Jun 2005
    Posts
    1,081
    Thanks
    4
    Thanked 15 Times in 15 Posts

    Default

    I'd like to point out that RFH servers run in Mdeium trust and hence any testing on a dev machine should also test this. An easy way to do this is add the following to the "system.web" section of the web.config file:

    Code:
    <system.web>
        <trust level="Medium" />
    </system.web>
    If memory serves me correct the FCKEditor used the msvcrt.dll unmanaged code to create a directory since an earlier version of the managed code method (System.IO.Directory.CreateDirectory()) had a bug whereby an error was generated if the user had no rights defined in one of the parent directories.

    I believe you only need to change a few lines in the FileBrowserConnector CreateFolder() method so as to use the System.IO.Directory.CreateDirectory() method.

  10. #10
    Join Date
    Sep 2006
    Posts
    210
    Thanks
    1
    Thanked 6 Times in 6 Posts

    Default

    Hi
    I have been having a look at the code, and I beleive I have found the specific piece of code that needs changing, but it will take me a little while as the source code is in C# and I am in the VB camp and I am not to hot on C#

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. changing file permissions
    By Space Cowboy in forum General Technical Support
    Replies: 6
    Last Post: 3rd April 2007, 06:43 PM
  2. FCKeditor
    By creativeworks in forum Technical Support
    Replies: 14
    Last Post: 19th February 2007, 10:12 AM
  3. Security Exception
    By spire128 in forum ASP.NET
    Replies: 6
    Last Post: 8th February 2007, 09:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •