You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ELMAH
I'm trying to get ELMAH to filter out an error we are getting and am
having some problems.
We already have 3 filter lines working to filter out exceptions on our
test environment (by checking if SERVER_NAME is one of the development
boxes).
The filter I'm trying to add is something like "If the Browser is IE8
(User agent contains Trident/4.0) and it is a specifc url"
Here is what I a tried but it is not working.
<errorFilter>
<test>
<or>
<equal binding="Context.Request.ServerVariables
['SERVER_NAME']" value="localhost" type="String" />
<equal binding="Context.Request.ServerVariables
['SERVER_NAME']" value="10.10.2.101" type="String" />
<equal binding="Context.Request.ServerVariables
['SERVER_NAME']" value="10.10.5.10" type="String" />
<and>
<regex binding="Context.Request.ServerVariables
['HTTP_USER_AGENT']" pattern="Trident\/4\.0" />
<equal binding="Context.Request.ServerVariables['URL']" value="/
MyApp/ScriptResource.axd" type="String" />
</and>
</or>
</test>
</errorFilter>
Any ideas on why it is not filtering out my errors? I also tried a
jscript version of the above without any success.
Atif Aziz
unread,
Jul 16, 2009, 7:31:27 AM7/16/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to el...@googlegroups.com
Your filter looks fine and should be working. I mocked
up the environment to test your filter in a simple console application
and it works fine given the right context and conditions. See the attached code. I've also posted it online at: http://gist.github.com/148371