0
votes

I'm trying to setup elmah on my web app,I changed web.config,executed Sql script on my db,added reference to elmah.dll and everything compiles fine but while debugging when I try to access http://localhost:someport/elmah.axd I get following exception:

An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll but was not handled in user code

Call stack loaction:

Elmah.DLL!Elmah.SimpleServiceProviderFactory.CreateFromConfigSection(string sectionName)

Source File Information:

Locating source for 'c:\builds\ELMAH\src\Elmah\SimpleServiceProviderFactory.cs'. Checksum: MD5 {f6 f8 c9 b cf 41 f7 11 7d de 16 2b ed 30 e4 83}
The file 'c:\builds\ELMAH\src\Elmah\SimpleServiceProviderFactory.cs' does not exist.
Looking in script documents for 'c:\builds\ELMAH\src\Elmah\SimpleServiceProviderFactory.cs'...
Looking in the projects for 'c:\builds\ELMAH\src\Elmah\SimpleServiceProviderFactory.cs'.
The file was not found in a project.
Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\builds\ELMAH\src\Elmah\SimpleServiceProviderFactory.cs.
The debugger could not locate the source file 'c:\builds\ELMAH\src\Elmah\SimpleServiceProviderFactory.cs'.

What is this SimpleServiceProviderFactory.cs class I'm missing?

Thanks!

1
Did you try using the NuGet package? For me the package version just worked.Davin Tryon
I will try and get back here if it worked.formatc
One other comment, after using NuGet package, if you are building an MVC app, you might have to add an ignore route for elmah routes.IgnoreRoute("admin/elmah.axd/{*pathInfo}");Davin Tryon
@dtryon I'm not building MVC. It's Web Forms, and the NuGet version worked liked charm, thank you for suggestion!formatc

1 Answers

0
votes

NuGet installation worked correctly, and it's much much easier then doing it manually!