-
We used to capture requests from clients to our server using the HttpDataportal and then inside our ObjectFactory we intercepted the requests and modified Http.Context .GetTelemetry and changed the name of the Telemetry being written. This so application Insights showed the Business Object name under the request inside the Log Analytics data / Performance tab inside Application Insights. See link: #1790 (comment) I think I have three possible solutions to look at:
We used to use nr 1 using the HttpContext, but I don't know why that no longer works... Any other idea's? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
The |
Beta Was this translation helpful? Give feedback.
-
I found the cause which results that the HttpContext.Current is null. It had nothing to do with CSLA upgrade. Calling the following GetRequestBody() method from our controller results into the HttpContext.Current to be null. |
Beta Was this translation helpful? Give feedback.
-
I found a new solution and just moved all into our controller as it is the first possible entry and the only place that the HttpContext is always available. Also to not serialize and deserialize more than needed I had to copy csla code into our own controller. The base code does not return information whether there are errors inside the result, so another reason to copy the code. Here is our new Controller and see why I had to do this.
|
Beta Was this translation helpful? Give feedback.
I found a new solution and just moved all into our controller as it is the first possible entry and the only place that the HttpContext is always available. Also to not serialize and deserialize more than needed I had to copy csla code into our own controller. The base code does not return information whether there are errors inside the result, so another reason to copy the code.
Client-side there is a new access token acquired by MSAL each time a requests goes into the backend. Some businessobjects are allowed to bypass the token validation.
Here is our new Controller and see why I had to do this.