Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

.net

azure

I have a Azure service which I developed using the C#.Net. When I compiled the solution it does it without any errors.

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

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

The following is the section where it points to 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>
like image 819
krrishna Avatar asked Nov 24 '25 07:11

krrishna


1 Answers

Make sure you have the Application Insights API nuget package installed

  1. Open the context menu of your project in Visual Studio solution explorer.
  2. Choose Manage NuGet Packages.
  3. View Online packages and search for "Application Insights". Include the quotation marks.
  4. Choose Application Insights Telemetry SDK for Services.
like image 143
TheGeneral Avatar answered Nov 26 '25 00:11

TheGeneral



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!