Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3339786
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:31:58+00:00 2026-05-18T00:31:58+00:00

I created an array sorter to sort arrays like in Win Explorer in a

  • 0

I created an array sorter to sort arrays like in Win Explorer in a DNN module. As in the answer to a preview question:

Sorting an array of folder names like Windows Explorer (Numerically and Alphabetically) – VB.NET

A user is getting the following error (below) whenever they run the module, I’m not a particularly seasoned ASP.NET developer. Is this error caused becuase I used StrCmpLogicalW in my IComparer and is being used on a platform that does not support StrCmpLogicalW. Or is it caused becuase of a permissions issue.

Any help is much appriciated,

Thanks a huge lot.

Here’s the sorter that causes the error.

Public Class nvSorter
    Implements IComparer(Of String)

    Declare Unicode Function StrCmpLogicalW Lib "shlwapi.dll" ( _
        ByVal s1 As String, _
        ByVal s2 As String) As Int32

    Public Function Compare(ByVal x As String, ByVal y As String) As Integer Implements System.Collections.Generic.IComparer(Of String).Compare
        Return StrCmpLogicalW(x, y)
    End Function

End Class

And this is the Exception stack trace :

InnerException: Failed to compare two elements in the array.

Message:
DotNetNuke.Services.Exceptions.PageLoadException: Failed to compare two elements in the array. —|>
System.InvalidOperationException: Failed to compare two elements in the array. —|> System.Security.SecurityException: System.Security.Permissions.SecurityPermission at Nukeville.Modules.SkinLab.View.nvSorter.Compare(String x, String y) at System.Collections.Generic.ArraySortHelper1.SwapIfGreaterWithItems(T[] keys, IComparer1 comparer, Int32 a, Int32 b) at System.Collections.Generic.ArraySortHelper1.QuickSort(T[] keys, Int32 left, Int32 right, IComparer1 comparer) at System.Collections.Generic.GenericArraySortHelper1.Sort(T[] keys, Int32 index, Int32 length, IComparer1 comparer) The type of the first permission that failed was: System.Security.Permissions.SecurityPermission The Zone of the assembly that failed was: MyComputer — End of inner exception stack trace — at System.Collections.Generic.GenericArraySortHelper1.Sort(T[] keys, Int32 index, Int32 length, IComparer1 comparer) at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer1 comparer) at System.Array.Sort[T](T[] array, IComparer1 comparer) at Nukeville.Modules.SkinLab.View.GetNVFolder(String ParentName, String[] cf) at Nukeville.Modules.SkinLab.View.GetJavaFolderArrays(String RootPath) at Nukeville.Modules.SkinLab.View.Page_PreRender(Object s, EventArgs e) at System.Web.UI.Control.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) — End of inner exception stack trace —

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:31:58+00:00Added an answer on May 18, 2026 at 12:31 am

    It’s a security issue. You can’t p/invoke StrCmpLogicalW() from a partial trust ASP.NET environment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array I've created in JavaScript. The end result comes out to
I'm currently turning an array of pixel values (originally created with a java.awt.image.PixelGrabber object)
How do I pass an array I have created on the server side onto
I need to sort an array containing a list of words and search the
I want to create an array with a message. $myArray = array('my message'); But
I want to create an array/list of strings of the Comma seperated strings (file
How can I create an array of email addresses contained within a block of
What's the easiest way to create an array of structs in Cocoa?
I want to create an associative array: var aa = {} // Equivalent to
I need to create a 2D int array of size 800x800. But doing so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.