Could not load type 'Microsoft.ApplicationInsights.Telemetry.Web.ApplicationInsightsModule'

I have an Azure service that I developed using C # .Net. When I compiled the solution, it does it without error.

But when I run it, it throws the following error:

Could not load type 'Microsoft.ApplicationInsights.Telemetry.Web.ApplicationInsightsModule'

Below is the section where it indicates when I run the solution.

<system.web>
     <compilation debug="true" targetFramework="4.5" />
     <httpRuntime targetFramework="4.5" relaxedUrlToFileSystemMapping="true" />
     <customErrors mode="Off" defaultRedirect="/Error/Error.html" />
     <pages controlRenderingCompatibilityVersion="4.5" />
     <httpModules>
        <add name="ApplicationInsights" type="Microsoft.ApplicationInsights.Telemetry.Web.ApplicationInsightsModule" />
     </httpModules>
</system.web>

      

+3


source to share


2 answers


Make sure you have the nuget API Insight package installed.



  • Open the context menu for your project in the Visual Studio Solution Explorer.
  • Select Manage NuGet Packages.
  • Browse online packages and search for "Insight Insight". Include quotes.
  • Select Application Insights Telemetry SDK for Services.
+3


source


I had the same problem. This was fixed by installing the nuget package Microsoft.ApplicationInsights.



+2


source







All Articles