Correct syntax in web.config (EventMappings-tag)

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?
 
C

Coskun Sunali [MVP]

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.
 
K

K Viltersten

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top