Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am trying to create a global webpart that should represent a filecenter. The filecenter is a document library on the root site of my sharepoint portal.

I followed this guide here: http://blog.concurrency.com/sharepoint/creating-global-list-or-library-web-parts-with-sharepoint-designer-2010/

to create a global webppart. The creation process went without any errors and I could also deploy the webpart on a child site of my sharepoint portal without any problems. However, once I try to access deeper folder structures via the webpart I created, the webpart stops working and shows an error instead. It is possible to download and open files that are in the root folder of the library and I can also upload new files to it via the webpart, but as soon as I try to go to a subfolder the error occurs. I hope someone can help me, as I am pretty desperate right now.

Here's the full error message from the log files:

System.ArgumentException: Value does not fall within the expected range.   
 at Microsoft.SharePoint.SPWeb.GetWebRelativeUrlFromUrl(String strUrl, Boolean includeQueryString, Boolean canonicalizeUrl)    
 at Microsoft.SharePoint.SPWeb.GetItem(String strUrl, Boolean bFile, Boolean cacheRowsetAndId, Boolean bDatesInUtc, String[] fields)    
 at Microsoft.SharePoint.SPList.EnsureCurrentFolderInfo()    
 at Microsoft.SharePoint.SPList.DoesUserHavePermissions(SPBasePermissions permissionMask, Boolean checkFolder)    
 at Microsoft.SharePoint.Utilities.RightsSensitiveVisibilityHelper.UserHasRights(PermissionContext permissionContext, SPBasePermissions permissions, PermissionMode permissionMode, SPContext context, SPWeb contextWeb, SPList contextList)    
 at Microsoft.SharePoint.Utilities.RightsSensitiveVisibilityHelper.ShouldBeVisible(PermissionContext permissionContext, SPBasePermissions permissions, PermissionMode permissionMode, PageModes pageModes, AuthenticationRestrictions authenticationRestrictions, SPContext renderContext, SPList contextList)    
 at Microsoft.SharePoint.WebControls.MenuItemTemplate.OnPreRender(EventArgs args)    
 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.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)

Hope someone can help :)

best regards, daZza

share|improve this question
    
I have a similar problem. Would be glad if anyone could help the OP and therefore also me. –  user13278 Nov 28 '12 at 18:58
add comment

2 Answers 2

Does SP Designer produce an XsltListViewWebPart when you do that?

I have had that error when doing a cross-web query with an XsltListViewWebPart. The error occurred in two situations:

  1. I didn't have my ViewGuid set correctly.
  2. My ToolbarContext was wrong.

To explain option (2), The XsltListViewWebPart apparently generates an "add new item" widget (even if it isn't rendered) which needs to operate in the context of the web where the list resides. For a cross-web query therefore you need to give it the correct context. This web page has an example of how you can work around the problem.

share|improve this answer
add comment

The cause of this problem is a wrong URL. If you notice when you place the mouse cursor above the folder name you will find that it points to the subsite and not the source site. This WebPart will only work on the site where the source document library is.

If you want you can open the folder by viewing the properties of the folder and click the Open button in the ribbon.

You can create your own WebPart to display Document Library items. This is an example to get you started.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.