Last post Aug 09, 2018 02:35 PM by Mighty_J
Aug 08, 2018 01:44 PM|Mighty_J|LINK
HttpRequestMessage.GetCorrelationId() always returns same Guid for different request. Is there any IIS or System configuration that could solve this problem? This is happening in my ASP.NET Web API app deployed to Window Server 2012 with
.NET framework 4.7.1.
Aug 09, 2018 07:21 AM|Brando ZWZ|LINK
As far as I know, the GetCorrelationId method returns the GUID that will be associated with the HttpRequestMessage that is passed as a parameter.
The value is created on the first call associated to a particular HttpRequestMessage object and then will retain that value for the same object throughout.
So, yes, you should see duplicates from the method as this would indicate that you are handling the same HttpRequestMessage object in those instances.
Aug 09, 2018 02:35 PM|Mighty_J|LINK
Same code works good(i.e., generates distinct correlationId) in our local VMs where as issue exists only in production environment.
This has something to do with ApplicationHost.config(IIS configuration). It has gone away when I did a wrong time format in applicationHost.config after taking a backup. When I put back the original applicationHost.config with correct time format, issue
Wrong format I tried is bolded- <periodicRestart memory="0" privateMemory="0" requests="0" time="1.05:00:00">