This is an old post, but we have been tripped up on this lately and very frustrated by it. (we are running 6.2.3) The issue for us was that the GetFoldersByPermissions was very slow and wouldn't return before the timeout, which we were able to trap through Query Profiler. The odd thing was the underlying query with the exact same parameters was very fast. We found some possible SQL solutions to this type of occurrence. The one we settle on was to use local variables in the sp and set them equal to the passed variables. Worked great.
Here is a link to the thread that lead us in this direction:
http://www.sqlpointers.com/2006/11/pa...Here are changes to the actual sp. We added the lines as marked below. Then we replaced the references to the original variables (like @PortalID) with the local variable (like @LocalPortalID) in the query section of the sp. Hope this helps someone.
ALTER PROCEDURE [dbo].[dnn_GetFoldersByPermissions]
@PortalID int,
@Permissions nvarchar(300),
@UserID int,
@FolderID int,
@FolderPath nvarchar(300)
AS
[ADDED STARTING HERE]
SET NOCOUNT ON;
DECLARE @LocalPortalID int,
@LocalPermissions nvarchar(300),
@LocalUserID int,
@LocalFolderID int,
@LocalFolderPath nvarchar(300)
SET @LocalPortalID = @PortalID
SET @LocalPermissions = @Permissions
SET @LocalUserID = @UserID
SET @LocalFolderID = @FolderID
SET @LocalFolderPath = @FolderPath
[END OF WHAT WE ADDED]
DECLARE @IsSuperUser BIT
DECLARE @Admin BIT
DECLARE @Read INT
DECLARE @Write INT
DECLARE @Browse INT
DECLARE @Add INT
.....