If I am using a provider hosted app with the code below, its not clear to me how can I monitor logs, provider hosted apps runs in this case in a separate iis site, correct?
The System.Diagnostics line where does it log to? ULS? IIS Logs? Event Logs?
I am trying to know a good approach to debugging apps once they are in production. Specially if each app is different iis site
What other options do I have to the System.Diagnostics line?
EventReceiverDefinitionCreationInformation receiver = new EventReceiverDefinitionCreationInformation(); receiver.EventType = EventReceiverType.ItemAdded; //Get WCF URL where this message was handled OperationContext op = OperationContext.Current; Message msg = op.RequestContext.RequestMessage; receiver.ReceiverUrl = msg.Headers.To.ToString(); receiver.ReceiverName = RECEIVER_NAME; receiver.Synchronization = EventReceiverSynchronization.Synchronous; //Add the new event receiver to a list in the host web jobsList.EventReceivers.Add(receiver); clientContext.ExecuteQuery(); System.Diagnostics.Trace.WriteLine("Added ItemAdded receiver at " + msg.Headers.To.ToString());