Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

CheckPermissions methos throws "Cannot complete this action

  Asked By: Theresa    Date: Apr 18    Category: Sharepoint    Views: 2346

I am checking the user permisssion on the site and list using the
CheckPermission method. Its throwing a COM exception with the error message
"Cannot complete this action. Please try again later".

Any help on this problem?

Here is code snippet

objWeb.CatchAccessDeniedException = false;

try
{
objWeb.Permissions.CheckPermission(SPRights.ViewPage)
return true;
}
catch ( Exception ex)
{
Response.Write(ex.Message);
}

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Irene Moss     Answered On: Apr 18

Not sure, but this might be one of the methods that must be run with admin
rights - what user  are you running under, and does that user have admin rights
on the server?

 
Answer #2    Answered By: John Scott     Answered On: Apr 18

The user  is not an Admin. The CheckPermissions() method  is used to check the
permissions of the current logged in User. If this method needs admin rights to
function properly, then no point in using this method, since admin has
permissions to all of the data on the portal

 
Answer #3    Answered By: Donald Torres     Answered On: Apr 18

This is known problem with SharePoint:

support.microsoft.com/default.aspx

There are many blogs out there that have a few different type of
workarounds (impersonation of the app pool without credentials, etc.) so
check on Google for them. I haven't figured out which one works in all
situations (and not sure if there is one).