I have basically loaded Elmah assemblies and installed the package using the NuGet plug-in. I remember it working with one of my project but suddenly it stopped working with
"Could not load type 'Elmah.ErrorLogModule' from assembly 'Elmah'."
error and that is weird. It used to work. Anyways I did not find many solutions to it on Google but I think people have faced this problem before. some suggested it is 32 bit 64 bit version issue.
Any suggestions?
Actually guys it turned out that it was a silly reason basically. It stopped working because I used the same name Elmah for my project as the assembly.
That made the whole thing stop working. A really silly mistake.
This can happen if Elmah was added manually before and the assembly binding in the web.config references a specific version:
This -
<modules>
<add name="ErrorMail" preCondition="managedHandler" type="Elmah.ErrorMailModule, Elmah-1.1"/>
<add name="ErrorLog" preCondition="managedHandler" type="Elmah.ErrorLogModule, Elmah-1.1"/>
<add name="ErrorFilter" preCondition="managedHandler" type="Elmah.ErrorFilterModule, Elmah-1.1"/>
</modules>
Should be this -
<modules runAllManagedModulesForAllRequests="true">
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
</modules>
" I remember it working with one of my project but suddenly it stopped..."
You have install the NuGet Elmah package for each project using it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With