locked
AI in WCF Service without HTTP-binding RRS feed

  • Question

  • I want to integrate AI in a WCF Service that is hosted in IIS and has only named pipes endpoints configured.
    Because AI is initialized by a HTTP module, the only way I get this working is to enable ASP.NET compatibility mode.

    Is there a better solution to get this running?

    In general, I don't understand why a HTTP module is used in this case and not an OWIN middleware.
    I think the HTTP module is also a problem for ASP.NET 5 Applications.

    Tuesday, January 5, 2016 12:35 PM

Answers

  • Hello, have you seen this? http://blog.rassie.dk/2015/12/using-azure-application-insights-to-monitor-a-self-hosted-wcf-service-part-1/

    As I understand it, WCF services do not need HTTP module, we are setting the instrumentation key in code, so do not have any app insights in web.config.

    We have added app insights to our service host projects only, and our AiWcfLogging class is attached as an attribute to our service implementation classes.

    • Proposed as answer by mark.ellard-ochit Thursday, January 7, 2016 12:11 PM
    • Marked as answer by .snoop_ Monday, January 18, 2016 2:52 PM
    Wednesday, January 6, 2016 5:07 PM

All replies

  • Hello, have you seen this? http://blog.rassie.dk/2015/12/using-azure-application-insights-to-monitor-a-self-hosted-wcf-service-part-1/

    As I understand it, WCF services do not need HTTP module, we are setting the instrumentation key in code, so do not have any app insights in web.config.

    We have added app insights to our service host projects only, and our AiWcfLogging class is attached as an attribute to our service implementation classes.

    • Proposed as answer by mark.ellard-ochit Thursday, January 7, 2016 12:11 PM
    • Marked as answer by .snoop_ Monday, January 18, 2016 2:52 PM
    Wednesday, January 6, 2016 5:07 PM
  • Thanks for the link.
    There it is described that accessing the "TelemetryConfiguration.Active" namespace is enough to trigger AI to read the ApplicationInsights.config and initialize.

    Monday, January 18, 2016 2:52 PM