I had recently stood up a new SharePoint 2007 infrastructure that had a lot of custom workflows for business automation. This new infrastructure also had Citrix WISP (Web Interface for SharePoint) to provide Citrix applications to our users. Upon our testing we had noticed that none of our workflows were being kicked off. So we started checking permissions to make sure that all the security settings were set correctly to allow for the workflows to kick off and to access the fields in the library’s as necessary.

After all the permissions were verified I checked the SharePoint log file to find this information.

Engine RunWorkflow: System.Security.SecurityException: Request failed. at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action) at System.RuntimeMethodHandle._CheckLinktimeDemands(Void* modu...

...le, Int32 metadataToken) at System.RuntimeMethodHandle.CheckLinktimeDemands(Module module, Int32 metadataToken) at System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes) at System.Reflection.CustomAttribute.GetCustomAttributes(Assembly assembly, RuntimeType caType) at System.Workflow.Activities.Rules.RuleValidation.<LoadExtensionAttributeType>b__0(Assembly a) at System.Array.ForEach[T](T[] array, Action`1 action) at System.Workflow.Activities.Rules.RuleValidation.LoadExtensionAttributeType(Boolean loadAttributes) at System.Workflow.Activities.Rules.RuleValidation..ctor(Activity activity, ITypeProvider typeProvi...

...der, Boolean checkStaticType) at System.Workflow.Activities.Rules.RuleConditionReferenceValidator.Validate(ValidationManager manager, Object obj) at System.Workflow.ComponentModel.Compiler.ValidationHelpers.ValidateObject(ValidationManager manager, Object obj) at System.Workflow.ComponentModel.Compiler.DependencyObjectValidator.ValidateDependencyProperty(DependencyObject dependencyObject, DependencyProperty dependencyProperty, ValidationManager manager) at System.Workflow.ComponentModel.Compiler.DependencyObjectValidator.Validate(ValidationManager manager, Object obj) at System.Workflow.ComponentModel.Compiler.ActivityValidator.Validate(ValidationManager manager, Object obj) at System.Workflow.ComponentModel.Compiler.CompositeActivityValidator.Validate(ValidationMan...

...ager manager, Object obj) at System.Workflow.Activities.IfElseBranchValidator.Validate(ValidationManager manager, Object obj) at System.Workflow.ComponentModel.Compiler.ValidationHelpers.ValidateObject(ValidationManager manager, Object obj) at System.Workflow.ComponentModel.Compiler.ValidationHelpers.ValidateActivity(ValidationManager manager, Activity activity) at System.Workflow.ComponentModel.Compiler.CompositeActivityValidator.Validate(ValidationManager manager, Object obj) at System.Workflow.Activities.IfElseValidator.Validate(ValidationManager manager, Object obj) at System.Workflow.ComponentModel.Compiler.ValidationHelpers.ValidateObject(ValidationManager manager, Object obj) at System.Workflow.ComponentModel.Compiler.ValidationHelpers.ValidateActivity(Va...

...lidationManager manager, Activity activity) at System.Workflow.ComponentModel.Compiler.CompositeActivityValidator.Validate(ValidationManager manager, Object obj) at System.Workflow.Runtime.WorkflowDefinitionDispenser.ValidateDefinition(Activity root, Boolean isNewType, ITypeProvider typeProvider) at System.Workflow.Runtime.WorkflowDefinitionDispenser.LoadRootActivity(Type workflowType, Boolean createDefinition, Boolean initForRuntime) at System.Workflow.Runtime.WorkflowDefinitionDispenser.GetRootActivity(Type workflowType, Boolean createNew, Boolean initForRuntime) at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance) at System.Workflow.Runtime.WorkflowRun...

...time.Load(Guid key, CreationContext context, WorkflowInstance workflowInstance) at System.Workflow.Runtime.WorkflowRuntime.GetWorkflowExecutor(Guid instanceId, CreationContext context) at System.Workflow.Runtime.WorkflowRuntime.InternalCreateWorkflow(CreationContext context, Guid instanceId) at System.Workflow.Runtime.WorkflowRuntime.CreateWorkflow(Type workflowType, Dictionary`2 namedArgumentValues, Guid instanceId) at Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWinOeWorkflow winoeworkflow, SPWorkflowEvent e) at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut) The action that failed was: LinkDemand The type of the first permission that failed ...

...was: System.Security.PermissionSet The demand was for: <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/> The granted set of the failing assembly was: <PermissionSet class="System.Security.PermissionSet" version="1"> <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Execution"/> <IPermission class="System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Url="file:///C:/inetpub/wwwroot/wss/VirtualDirectories/Intranet80/bin/shared.DLL"/> <IPermission class="System.Security.Permissions.ZoneIdentityPermission, mscorlib, Version=2.0.0.0, Culture=ne...

...utral, PublicKeyToken=b77a5c561934e089" version="1" Zone="MyComputer"/> <IPermission class="System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Level="Minimal"/> <IPermission class="Microsoft.SharePoint.Security.WebPartPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" version="1" Connections="True"/> </PermissionSet> The assembly or AppDomain that failed was: shared, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null The Zone of the assembly that failed was: MyComputer The Url of the assembly that failed was: file:///C:/inetpub/wwwroot/wss/VirtualDirectories/Intranet80/bin/shared.DLL

HMMMM…. Seems to be an issue with the Shared.DLL that gets installed into the sites local bin directory when you install WISP.

When WISP is installed this DLL causes the workflows to stop working.

The Resolution: The quick resolution for this problem is to delete the shared.dll from the sites local bin directory and let it use the one installed into the GAC. Once you delete this file you will see that your workflows and WISP are now both working as designed and your headache will be gone :) atleast mine was :)