locked
Deployment error for WCF rest service on IIS 7 RRS feed

  • Question

  • Hi,

    I am trying to create plain wcf rest service for GetData. It works well with IIS Express. As soon as I deploy it on Local IIS I am getting following error :

    Server Error in '/ResstWCFSample' Application.

    Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web does not implement IHttpHandlerFactory or IHttpHandler.

                 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.            

    Exception Details: System.Configuration.ConfigurationErrorsException: Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web does not implement IHttpHandlerFactory or IHttpHandler.

    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.                  

    Stack Trace:
    [ConfigurationErrorsException: Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web does not implement IHttpHandlerFactory or IHttpHandler.]
       System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type) +11861638
       System.Web.Configuration.HandlerFactoryCache..ctor(String type) +25
       System.Web.HttpApplication.GetFactory(String type) +104
       System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +262
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +137

    Please help me to solve this issue. I have not added any of the dll given above. It get loaded automatically when I am selecting WCF Service Application template to create wcf service.

    Thursday, March 10, 2016 6:00 PM

Answers

  • Hello dipika,

    I have had some annoyances with the big push to use application insights by MS.  It does feel a bit heavy handed as often it is on by default.  I could be wrong but most of the templates I have experienced do have a option for application insights that is on by default.

    Another thing you can try is removing telemetry from the httpModules secton in system.web and system.webservice.  You should also remove the references to telemetry.  I suggest using the NuGet Package Manger to do this in the first instance.  In my experience it does a good job of cleaning things up but you might find the web.config will need a review afterwards.

    Good luck!


    Jeff

    Thursday, March 10, 2016 9:50 PM