Mark configuration file as duplicate Exceptionless package

I donโ€™t know what happened to my project, but when I tried to start it, I received the error message Could not load file or assembly 'Exceptionless.Mvc' or one of its dependencies

Eceptionless.MVC is not used or mentioned anywhere in my project. I canโ€™t even find the text with the Exception ......

So, I used Nuget Manager to install the exceptless.MVC package.

Now i get an error

 `HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Config Error There is a duplicate 'exceptionless' section defined ` 

Installing an Exclusive .Mvc Added the Following to My Web Configuration

  <section name="exceptionless" type="Exceptionless.ExceptionlessSection, Exceptionless" /> <exceptionless apiKey="API_KEY_HERE" /> <modules runAllManagedModulesForAllRequests="true"> <add name="ExceptionlessModule" type="Exceptionless.Mvc.ExceptionlessModule, Exceptionless.Mvc" /> </modules> 

and updated configuration package

  <package id="Exceptionless" version="4.2.1982" targetFramework="net45" /> 

This is the only ref for MVC exceptions / exceptions in my project.

I am at a loss that looking for it with mvc without any problems or where duplicate sections are

any help pls?

+2
source share
3 answers

The problem is with the duplicate web configuration file stored in IIS. Renaming this web configuration allowed the original to take priority, eliminating any recurring problems without any exceptions.

+1
source

You should try to remove the handler and then add it back. Here is a similar example:

  <system.webServer> <handlers> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> </handlers> 

You may also have to comment on this part.

  <section name="exceptionless".... 
0
source

Web.config inherits from Web.config from the parent application. There is also a machine interface web.config and machine.config.

1) If the application is in IIS and there is a parent application, check the web.config of the parent application

2) Check your machine web.config and machine.config. Assuming you are on .NET 4.0 and above, they are located here: C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Config (for the x32 bit application pool) C: \ Windows \ Microsoft.NET \ Framework64 \ v4 .0.30319 \ Config (for x64 bit application pool)

0
source

Source: https://habr.com/ru/post/1274520/


All Articles