I have a .NET 4.0 web application which implements an error handler within the Application_Error event of Global.asax.
When an exception occurs this intercepts it and sends me an email including a variety of information like the logged in user, the page the error occurred on, the contents of the session etc.
This is all great but there is some fundamental detail missing which I seem unable to locate, i.e. the name of the control or the value that caused it to be out of range:
Selection out of range
Parameter name: value 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.ArgumentOutOfRangeException: Selection out of range
Parameter name: value
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:
|
8 Answers, 1 is accepted
As it appears from the stack trace provided, RadComboBox is the control which had caused this error. Could you share the implementation of your RadComboBox so I could inspect it?
All the best,
Dimitar Terziev
the Telerik team
Thanks, I did realise it was a RadComboBox which caused the error.
My issue is that I have about 6 RadComboBox items on that page and it would really help if I knew WHICH one threw the exception.
Why is this information not shown in the stack trace?
The stack trace provides information about the methods which have been invoked prior to the occurrence of the exception.
Kind regards,
Dimitar Terziev
the Telerik team
How do we know which among 6 RadComboBox controls has thrown the exception, since the exception doesn't mention the exact RadComboBox control which caused the issue.
Thanks,
Naveen
In general the stack trace does not provide information which instance of the combobox has caused the exception. Could you clarify what exactly is the experienced problem?
Kind regards,
Dimitar Terziev
the Telerik team
I have a user control (OrderEntry.ascx) which has about 20 RadCombobox controls, some of them hidden. On the page load of OrderEntry.ascx control, data bind works fine without any issues. But when I do a post back and try to bind the data again to the user control OrderEntry.ascx, I am getting the below exception. I could not figure out which combobox control, is throwing this exception.
Please let me know if there is a way to figure out which combo box control is throwing this exception? Is there a way to troubleshoot this problem ? Is this a know issue ?
C# code
this.OrderEntry..DataSource = custInfo;
this.OrderEntry..DataBind(); /// Exception thrown in this line.
Exception Type: System.ArgumentOutOfRangeException
Message: Selection out of range
Parameter name: value
ActualValue: NULL
ParamName: value
Data:
TargetSite: Void PerformDataBinding(System.Collections.IEnumerable)
HelpLink: NULL
Source: RadComboBox.Net2
StackTrace Information
*************************
at Telerik.WebControls.RadComboBox.PerformDataBinding(IEnumerable dataSource)
at Telerik.WebControls.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at Telerik.WebControls.RadComboBox.OnDataBinding(EventArgs e)
at Telerik.WebControls.RadComboBox.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at OrderEntryControl.DisplayCustomerAccountInformation(CustomerView view, FormMode mode) in c:\Controls\OrderEntryControl.ascx.cs:line 3164
at OrderEntryControl.DisplaySubmittedScreenData(Boolean isTrader) in c:\Controls\OrderEntryControl.ascx.cs:line 3243
at OrderEntryControl.ReviewOrder(CustomerOrder custOrder, Boolean checkForBrokenRules, List`1 boValidationResults) in c:\Controls\OrderEntryControl.ascx.cs:line 5038
at OrderEntryControl.VerifyOrderButton_Click(Object sender, EventArgs e) in c:\Controls\OrderEntryControl.ascx.cs:line 4924
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
As it is, it's near impossible to determine the cause of the error if you have more than a handful of RadComboBoxes on a page.
Hey I'm also struck with the same issue. I cant able to find which RadComboBox causing this ArguementOutofRange exception. I'm having nearly 20 RadcomboBox in my page. So kindly share me any advise to find which the RadCombobox causing this issue.
I'm looking forward for your fast reply with solution.