S
Shabam
A web application of mine developed using C# + MS SQL runs fine normally.
However when I stress test it with a load testing software (using about 60
simultaneous users) some instances start erroring out. I see two different
errors. One is a "Object reference not set to an instance of an object."
error, which appears to always contain the same information, and the other
is a "There is no row at position X.", where X is a number.
Is this an indication of bad coding or is this just a normal consequence of
overloading a web application? How can the above two errors happen when the
server is being overloaded when normally the application works fine?
ERROR #1:
Server Error in '/' Application.
----------------------------------------------------------------------------
----
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an
object.]
System.Data.DataView.GetRecord(Int32 recordIndex) +22
System.Data.DataView.IsOriginalVersion(Int32 index) +9
System.Data.DataRowView.GetColumnValue(DataColumn column) +23
System.Data.DataColumnPropertyDescriptor.GetValue(Object component) +25
System.Web.UI.DataBinder.GetPropertyValue(Object container, String
propName) +72
System.Web.UI.DataBinder.GetPropertyValue(Object container, String
propName, String format) +11
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +403
System.Web.UI.Control.DataBind() +26
FN.advancedsearch.populateListcontrols()
FN.advancedsearch.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
ERROR #2:
Server Error in '/' Application.
----------------------------------------------------------------------------
----
There is no row at position 5.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: There is no row at
position 5.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[IndexOutOfRangeException: There is no row at position 5.]
System.Data.DataView.GetRecord(Int32 recordIndex) +60
System.Data.DataView.IsOriginalVersion(Int32 index) +9
System.Data.DataRowView.GetColumnValue(DataColumn column) +23
System.Data.DataColumnPropertyDescriptor.GetValue(Object component) +25
System.Web.UI.DataBinder.GetPropertyValue(Object container, String
propName) +72
System.Web.UI.DataBinder.GetPropertyValue(Object container, String
propName, String format) +11
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +403
System.Web.UI.Control.DataBind() +26
FN.advancedsearch.populateListcontrols()
FN.advancedsearch.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
However when I stress test it with a load testing software (using about 60
simultaneous users) some instances start erroring out. I see two different
errors. One is a "Object reference not set to an instance of an object."
error, which appears to always contain the same information, and the other
is a "There is no row at position X.", where X is a number.
Is this an indication of bad coding or is this just a normal consequence of
overloading a web application? How can the above two errors happen when the
server is being overloaded when normally the application works fine?
ERROR #1:
Server Error in '/' Application.
----------------------------------------------------------------------------
----
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an
object.]
System.Data.DataView.GetRecord(Int32 recordIndex) +22
System.Data.DataView.IsOriginalVersion(Int32 index) +9
System.Data.DataRowView.GetColumnValue(DataColumn column) +23
System.Data.DataColumnPropertyDescriptor.GetValue(Object component) +25
System.Web.UI.DataBinder.GetPropertyValue(Object container, String
propName) +72
System.Web.UI.DataBinder.GetPropertyValue(Object container, String
propName, String format) +11
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +403
System.Web.UI.Control.DataBind() +26
FN.advancedsearch.populateListcontrols()
FN.advancedsearch.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
ERROR #2:
Server Error in '/' Application.
----------------------------------------------------------------------------
----
There is no row at position 5.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.IndexOutOfRangeException: There is no row at
position 5.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[IndexOutOfRangeException: There is no row at position 5.]
System.Data.DataView.GetRecord(Int32 recordIndex) +60
System.Data.DataView.IsOriginalVersion(Int32 index) +9
System.Data.DataRowView.GetColumnValue(DataColumn column) +23
System.Data.DataColumnPropertyDescriptor.GetValue(Object component) +25
System.Web.UI.DataBinder.GetPropertyValue(Object container, String
propName) +72
System.Web.UI.DataBinder.GetPropertyValue(Object container, String
propName, String format) +11
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +403
System.Web.UI.Control.DataBind() +26
FN.advancedsearch.populateListcontrols()
FN.advancedsearch.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750