Tuesday, May 24, 2016

Extract GAC DLL

Most of the times developers need to extract/copy dlls from GAC. The first step is to see whether these dlls are 32 bit or 64 bit or MSIL. So the first step is to open the command prompt and move to assembly folder. To do this, you need to run following command,

cd c:\Windows\assembly

Now you can see how many types of of assembly folders exists (Windows explorer does not let you select these folders). run following command and you will see the results as below,

dir


Monday, May 9, 2016

Operation is not valid due to current state of the object -- Elevated Privileges


Exception

ExceptionType=System.InvalidOperationExceptionJSON
Message=Operation is not valid due to the current state of the object.

Cause: 

I tried to call SPUtility.SendEmail within the RunWithElevatedPrivileges delegate.

Comments

If i try to run this method out of Elevated delegate, it works fine. All the other things that are working fine in Elevated Privileges (except send email) are,

  1. SPUtility.GetPrincipalsInGroup
  2. spWeb.EnsureUser