Application errors and broken requests

  • Thread starter Marius Tennes Krogh
  • Start date


Marius Tennes Krogh

I've written some code in my globala.asax application_error event to send me
some email whenever an error occur. I send the errormessage, stacktrace,
etc. and I also list all the form elements and their values
(Request.Form.AllKeys - looping through all keys).
Now, sometimes not all the Form elements that is in the page get listed.
What can cause this? Can it be that the request has been broken (not
complete) because of some error on the network? If this is so, how can I
detect an incomplete request?

Here is one example. This page have a lot of textboxes, but only three form
elements get listed
Type : System.FormatException
Message : String was not recognized as a valid DateTime.
Source : mscorlib
StackTrace: at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi,
DateTimeStyles styles)
at System.DateTime.Parse(String s, IFormatProvider provider,
DateTimeStyles styles)
at System.DateTime.Parse(String s, IFormatProvider provider)
at System.DateTime.Parse(String s)
at System.Convert.ToDateTime(String value)
at timelister.main.btn_forrige_dag_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\timeregistrering_v2_1\main.aspx.cs:line 316
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain()
* Form Values *

txt_error :
txt_periodeuke3 : 200529
btn_forrige_dag : <<

The error itself got thrown because it tried to convert the value in a
textbox called txt_day. But as you can see the texbox txt_day is not in the
Request.Form. If this happend because of an "incomplete" request, how can I
detect it? The user doesn't experience any error at all.

Any help would be appreciated.



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