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 created and filled a multidimentional array, and passed it to a function, like
All, I would like to sort this mutable dictionary of arrays keys like so:
I have to sort an array. Apart from the already existing types of sorting
i have created Array of Linkbutton and when user click on link button it
I have created an array square(40) as picturebox. I have to assign 40 picture
I have an array created with this code: var widthRange = new Array(); widthRange[46]
I have created an array Man: public main blah blah{ man = man[10]; }
I have created an array in php that prints this Array ( [mark] =>
I am trying to iterate a multidimension array created with the following line To
I created a multidimensional array called current_map . I am trying to access current_map

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.