Thursday, April 26, 2007

Content Query limitations, and Object module access rights requirements

Some new articles were published just now by Microsoft about sharepoint limits that were undocumented until now:
  1. The Content Query Web Part does not support more than 1000 lists at the same time.
    This is actually not a content query web part problem, but a SPSiteDataQuery problem, which the content query web part uses. If you are using SPSiteDataQuery in your code, or a Content Query web part in your page, you may see the error "The query cannot be completed because the number of lists in the query exceeded the allowable limit".
    So you have to be extra careful that your content query web part in not set up to query more than that amount.Read the Microsoft Article (opens in new window).
    Possible error message:
    "The query cannot be completed because the number of lists in the query exceeded the allowable limit. For better results, limit the scope of the query to the current site or list or use a custom column index to help reduce the number of lists."
  2. Error Message when running an application that accesses the object module.
    This is actually something I have encountered with my Utility pack and answered some people in the forums about this, and apperantly MS saw fit to document it properly now.
    When running an appliation on the server that tries to use the object module, you have to run with a user account that has sufficient permissions. Not just on the site, and not just on the server!:
    1. The user is a server farm administrator.
    2. The user has permissions to access the content database.
    3. The user is a site collection administrator.
    4. The user has permissions to access the Windows SharePoint Services site or the SharePoint Server 2007 site through which the code iterates.

    Notice requirement #2? this is where I failed with my utility pack on a client server - I was running the tool with an account that had local administration rights on the server, but the account didn't have any permissions on the database.
    This is also true for running stsadm operations such as backup and restore, or feature deployments... (something they don't say in the article...).
    Read the Microsoft Article (opens in new window).
    Possible error messages:
    "Unhandled Exception: System.IO.FileNotFoundException"
    "Access Denied" (The Microsoft article does not mention this, but I have seen this error for the same issue)

1 comment:

Robert Monteiro said...

Ishai,
Thanks for that. I have been struggling for the last 2 weeks trying to figure out the FileNotFoundException. I solved it today thanks to you.