Windows 2016 Server
CRM 2016
I have spent the last few days banging my head against a brick wall.
I have a custom entity (new_transactionsets) which when a record is added it will fire off a workflow. All that is currently in the workflow is to write an event to the window's log.
Try as I may, I keep getting the same error.
Code :
If Not EventLog.SourceExists("MySource") Then ' Create the source, if it does not already exist. ' An event log source should not be created and immediately used. ' There is a latency time to enable the source, it should be created ' prior to executing the application that uses the source. ' Execute this sample a second time to use the new source. EventLog.CreateEventSource("MySource", logName:="CRM2018") End If ' Create an EventLog instance and assign its source. Dim myLog As New EventLog() myLog.Source = "MySource" ' Write an informational entry to the event log. myLog.WriteEntry("Writing to event log.")
This code was taken from an example
I keep getting the following error
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>3215add6-4a00-44f1-993c-67e582dfc828</ActivityId>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.</Message>
<Timestamp>2018-05-01T15:36:22.6907092Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>
[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]
[4763eb62-b748-e811-8424-00155d01e101: ]
Sync workflow 'TransactionSets - Import Transactions' terminated with error 'The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.'
</TraceText>
</OrganizationServiceFault>
I have given network service full permission on the event log but still no joy ....
*This post is locked for comments
I have the same question (0)
Community Member
2
Christoph Pock
1