Filter Help?

58 views
Skip to first unread message

tompatros

unread,
May 7, 2009, 12:45:22 PM5/7/09
to ELMAH
When I apply the ELMAH filter below, I get an error message after
saving web.config. I need some help - I'm ultimately trying to filter
out errors reporting "System.Web.HttpException: The file '/xyz.aspx'
does not exist." or "System.Web.HttpException: Resource not found",
but I'm hoping to just get some kind of filtering working...

<!--- ELMAH filter config --->
<errorFilter>
<test>
<or>
<is-type-compatible binding="BaseException"
type="System.Web.HttpException" />
</or>
</test>
</errorFilter>


Error Message = Could not load type 'System.Web.HttpException' from
assembly 'Elmah, Version=1.0.10617.0, Culture=neutral,
PublicKeyToken=null'.

James_2JS

unread,
May 7, 2009, 3:21:17 PM5/7/09
to ELMAH
Hi there!

The problem is that you need to supply "The assembly-qualified name of
the type to get. [...] If the type is in the currently executing
assembly or in Mscorlib.dll, it is sufficient to supply the type name
qualified by its namespace." (see http://msdn.microsoft.com/en-us/library/w3f99sx1%28loband%29.aspx)

So try this instead...

<errorFilter>
<test>
<or>
<is-type-compatible binding="BaseException"
type="System.Web.HttpException, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</or>
</test>
</errorFilter>

Cheers,

James

Meno

unread,
May 14, 2009, 8:27:57 PM5/14/09
to ELMAH
Am I correct in saying the jscript syntax for error filtering isn't
available in the 1.0 final release?

On May 8, 5:21 am, James_2JS <jamesdrisc...@btinternet.com> wrote:
> Hi there!
>
> The problem is that you need to supply "The assembly-qualified name of
> the type to get. [...] If the type is in the currently executing
> assembly or in Mscorlib.dll, it is sufficient to supply the type name
> qualified by its namespace." (seehttp://msdn.microsoft.com/en-us/library/w3f99sx1%28loband%29.aspx)

Atif Aziz

unread,
May 15, 2009, 4:13:39 AM5/15/09
to el...@googlegroups.com
Am I correct in saying the jscript syntax for error filtering isn't
available in the 1.0 final release?

JScript is in 1.0 final release. See line 192 of the sample web.config for example usage:
http://code.google.com/p/elmah/source/browse/tags/REL-1.0/samples/web.config#192

Drew Freyling

unread,
May 15, 2009, 7:42:32 PM5/15/09
to el...@googlegroups.com
Thanks atif. The wiki still mentions the jscript is coming in a
release soon that is all.
--
Sent from my mobile device

Regards,

Drew Freyling
drew.f...@gmail.com

Atif Aziz

unread,
May 27, 2009, 2:09:03 PM5/27/09
to el...@googlegroups.com
wiki still mentions the jscript is coming in a release soon

Fixed.
Thanks for pointing this out.
Reply all
Reply to author
Forward
0 new messages