in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Eugene Katz

SharePoint Happens

Microsoft.SharePoint.SPException: This page is available only for a Web site with unique permissions.

If you programmatically encountered this error and can't find any information about it, then my effort has paid off.  At the time of posting, search for "This page is available only for a Web site with unique permissions" only has one hit and it isn't code-related.  So thank Joel Oleson, drop me a comment, and read on.

Microsoft.SharePoint.SPException: This page is available only for a Web site with unique permissions.
at Microsoft.SharePoint.SPUserCollection.UpdateMembers(Object objUpdateInfo, Object objRemoveLogins, Object objRemoveIds, Boolean fSendEmail)
at Microsoft.SharePoint.SPUserCollection.AddCollection(SPUserInfo[] addUsersInfo)
at Microsoft.SharePoint.SPUserCollection.Add(String loginName, String email, String name, String notes)

The problem is that you're trying to add a user to the web users (SPWeb.AllUsers), but the web inherits permission from the site, so try adding to the site users (SPWeb.SiteUsers) instead.  Now, what happens if the current web inherits from the parent web, but the parent web has unique permissions?  I think it will still work.

 

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

About ekatz

Why I started blogging? The answer has two parts (in no particular order):
Part 1: http://blogs.msdn.com/joelo/archive/2007/05/25/you-don-t-blog-i-m-suffering-because-you-don-t-blog.aspx
Part 2: http://www.codinghorror.com/blog/archives/000854.html
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts