Elmah on MVC website with WordPress/php sub directory

I have created a website using ASP.NET MVC and use ELMAH for error handling, this works perfectly. After setting up a virtual directory on my website under /blog and adding the necessary WordPress php files and mysql db, I get the below error come up.

Could not load file or assembly 'Elmah' or one of its dependencies. The system cannot find the file specified.

I think this has something to do with the fact that ELMAH is applying itself to all sub-directories.

Read More

Is there a way that I can tell ELMAH to ignore everything under /blog? Or is there a way to get around this?

Thanks in advance.

Related posts

Leave a Reply

1 comment

  1. Copy the MVC project’s Web.config into the /blog subdirectory, and inside it, change all of the Elmah-related handlers <add name="Elmah" etc. etc. /> to <remove name="Elmah" /> – that should sort it.