Correct syntax in web.config (EventMappings-tag)

  • Thread starter Thread starter K Viltersten
  • Start date Start date
K

K Viltersten

I see in my web.config that i have the following
passage.

<eventMappings>
<add
name="All Errors"
type="System.Web.Management.WebBaseErrorEvent"
startEventCode="0"
endEventCode="2147483647"/>
...

It has been suggested to me that i might want to
rewrite it to the following form.

<add
name="All Errors"
type="System.Web.Management.WebBaseErrorEvent,
System.Web,
Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
startEventCode="0"
endEventCode="2147483647"/>

While i have no problems adapting to the other
way, i'm reluctant to the idea of putting in
things not neccessary. How crucial is the extra
information that i've been omiting this far?
 
Hi Viltersten,

There is no difference between two of the configurations. They will work the
same way. The only change is that, in the second example, you explicitly set
what assembly contains the System.Web.Management.WebBaseErrorEvent class.

The idea behind setting it explicitly is coming over the ambiguity problems
you may have if the same namespace-class couple is found in another
assembly.

Hope it helps.
 
Got it. Thanks!

--

Regards
Konrad Viltersten
--------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
 
Back
Top