3

I have a ASP.NET Web API controller that provides a saveAndNew operation.

This class is derived from System.Web.Http.ApiController as expected.

Application Insights is correctly configured using version 2.1.0 of the SDK and the default settings in ApplicationInsights.config.

If a request to the mentioned operation fails - for example with status code 400 - the request is recorded correctly in App Insights.

The problem is that if the operation SUCCEEDS (status code 200) nothing is recorded in Application Insights.

I've used Fiddler to see if the request is made to the App Insights track service and it is not. So the problem is not in the configuration of Application Insights on the Azure portal.

I can't figure out what is preventing ALL requests to my Web API controllers operations from being recorded.

Can anyone help?

1 Answer 1

5

You might want to try removing/commenting out TransferRequestHandler in ApplicationInsights.config file.

GitHub issue "REST API app can have all requests filtered out" here states that: "commenting out the one line in the ApplicationInsights.config caused successful requests to start getting logged. Web API 2 project.

<!--<Add>System.Web.Handlers.TransferRequestHandler</Add>-->
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.