2014-04-15 83 views
0

我在生產環境中部署了一個解決方案,此後,特定對話框無法正常工作。在我在生產中導入的解決方案中,該對話框確實存在,但我沒有對其進行修改。只添加了其他幾個工作流程,當我部署時,我選擇覆蓋目標環境(生產)中的所有定製。部署後的對話框失敗

由於某些原因,即使安全角色不是解決方案的一部分(?),也會對其進行修改。從那以後,我們修復了角色,以便我們的工作流程/對話框能夠再次運行,但我們仍然存在一個對話框的問題。

這裏是日誌文件:

>Crm Exception: Message: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 3732d599-343b-e211-ada4-0050569512fe, OwnerId: 8a3819fd-333b-e211-ada4-0050569512fe, OwnerIdType: 9 and CallingUser: a6e65698-daa2-e211-bd17-0050569512fe. ObjectTypeCode: 2020, objectBusinessUnitId: 765d6665-293b-e211-ada4-0050569512fe, AccessRights: ReadAccess , ErrorCode: -2147187962 
[2014-04-15 08:28:37.797] Process: w3wp |Organization:f6ff335a-293b-e211-ada4-0050569512fe |Thread: 13 |Category: Platform.Sdk |User: a094a9a1-29f2-4079-972c-b682b966825c |Level: Error |ReqId: 85a8444a-bcd0-4de6-ada5-30e8eea8a142 | VersionedPluginProxyStepBase.Execute ilOffset = 0x65 
>Web Service Plug-in failed in SdkMessageProcessingStepId: {CFCBBB1B-EA3E-DB11-86A7-000A3A5473E8}; EntityName: queueitem; Stage: 30; MessageName: Retrieve; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. 
    at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) 
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) 
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 
    at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values) 
    at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider) 
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) 
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) 
Inner Exception: Microsoft.Crm.CrmSecurityException: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 3732d599-343b-e211-ada4-0050569512fe, OwnerId: 8a3819fd-333b-e211-ada4-0050569512fe, OwnerIdType: 9 and CallingUser: a6e65698-daa2-e211-bd17-0050569512fe. ObjectTypeCode: 2020, objectBusinessUnitId: 765d6665-293b-e211-ada4-0050569512fe, AccessRights: ReadAccess 
    at Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckEx2(ExecutionContext context, SecurityPrincipal principal, SecurityPrincipal ownerPrincipal, Guid objectId, Int32 objectTypeCode, Guid objectBusinessUnitId, AccessRights rights) 
    at Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckEx(ExecutionContext context, SecurityPrincipal ownerPrincipal, Guid objectId, Int32 objectTypeCode, Guid objectBusinessUnitId, AccessRights rights) 
    at Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckEx(ExecutionContext context, SecurityAttributes attributes, AccessRights rights) 
    at Microsoft.Crm.BusinessEntities.SecurityExtension.PostRetrieveHandler(Object sender, ExtensionEventArgs e) 
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode, DatabaseQueryTarget queryTarget) 
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context, Int32 languageCode) 
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Retrieve(BusinessEntityMoniker moniker, EntityExpression entityExpression, ExecutionContext context) 

我試圖獲取有關SdkMessageProcessingStepId更多信息,與ID CFCBBB1B-EA3E-DB11-86A7-000A3A5473E8,但我無法找到表中任何東西。

我已經確保用戶的角色具有對的ObjectTypeCode的正確訪問權限,順便說一句,在另一個環境(TEST)中工作正常。

對不起格式化,我盡我所能使它可讀。

+0

你可以說你有什麼代碼在插件中檢索queueitem嗎? –

+0

我對此CRM解決方案不是100%熟悉。我試圖使用提到的SdkMessageProcessingStepId的ID來獲取更多信息。我直接查詢SQL表,沒有發現這個ID的記錄。 –

回答

1

的錯誤是明顯的:

SecLib :: AccessCheckEx失敗

這意味着權限錯誤

ObjectTypeCode:2020

所涉及的實體,在這種情況下Queue

AccessRights:ReadAccess

缺少特權,在這種情況下,讀

CallingUser:a6e65698-DAA2-E211-bd17-0050569512fe

用戶的ID缺少這個特權。

+0

我可以看到。但是,對於用戶所屬的安全角色,Read特權在兩種環境中均設置爲「用戶」。在一個工作,但不在生產中,另一個工作。 –

+0

記錄的所有者是一個團隊,您確定「用戶」特權足以讓該用戶訪問該記錄嗎?你是否試圖提升特權? –

+0

權利,所有者類型ID 9確實是一個團隊。也許我應該檢查該團隊是否具有足夠的對Queue記錄的讀取訪問權限,並且該用戶是該團隊的一部分? –