我有一个 CRM 插件,它已经工作了一段时间,但最近开始间歇性地抛出以下错误:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Service not available, closing transmission channel. The server response was: 4.3.2 Service not activeDetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Service not available, closing transmission channel. The server response was: 4.3.2 Service not active</Message>
<Timestamp>2015-04-21T15:31:20.3902191Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>
知道可能是什么原因造成的吗?
除以下代码外,所有内容都在 try/catch 中:
IPluginExecutionContext context = (IPluginExecutionContext)serviceprovider.GetService(typeof(IPluginExecutionContext));