In “Timing is Everything” I mentioned how I successfully managed to convince management to install ELMAH.  I wanted to add some comments as to how to easily get some values into ELMAH that you might have in your SESSION.

The easy way, with no code changes, is simply store those values in a COOKIE.

HttpCookie c = new HttpCookie("CUSTOMVAL");
c.Value = (string) Session["CUSTOMVAL"];
Response.Cookies.Add(c);

Viola! It will be in the ELMAH Error page!

Other Interesting Posts

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*


7 + = 8

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>