Event Hub: Identifying the Originating Request
Hi,
I'm using the EventHub events RoleAssigned and RoleUnassigned in some custom integration code to sync user data from Sitefinity to another system.
When I update a role for a user through my integration code the event fires and when I update a role for a user in Sitefinity the event fires.
Is there any way to determine where the originating request to Assign/Unassign a role came from, my custom code or from the Sitefinity UI?
Thanks,
Steve
Hello Steve,
Unfortunately the eventInfo does not carry such information, so I would suggest to use the UrlReferrer in order to determine where from the request is coming form.
var source = HttpContext.Current.Request.UrlReferrer.AbsolutePath
Thanks Pavel,
That is what I am using now but I was hoping for a more graceful method.
Thanks again,
Steve