Created
April 27, 2017 05:33
-
-
Save doeringp/1431c55f5755b11d61e75f832ff22ae5 to your computer and use it in GitHub Desktop.
Get the Correlation Id of the current request in SharePoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class overview : Page | |
{ | |
[DllImport("advapi32.dll")] | |
public static extern uint EventActivityIdControl(uint controlCode, ref Guid activityId); | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
var correlationId = new Guid(); | |
EventActivityIdControl(1, ref correlationId); | |
// Now you have the current correlation id. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment