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.
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.
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.
精彩评论