Server Error in '/' Application.

There is no row at position 0.

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

Source Error:


Line 72:         Dim dt As DataTable = bl.GetDataTableByIdutente(idutente)
Line 73: 
Line 74:         If Not IsDBNull(dt.Rows(0).Item("IdUtente")) Then
Line 75:             _IdUtente = dt.Rows(0).Item("IdUtente")
Line 76:         End If

Source File: C:\inetpub\wwwroot\Root\App_Code\VBCode\Utente.vb    Line: 74

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2441565
   System.Data.DataRowCollection.get_Item(Int32 index) +19
   Utente..ctor(String idutente) in C:\inetpub\wwwroot\Root\App_Code\VBCode\Utente.vb:74
   Armatore..ctor(String idutente) in C:\inetpub\wwwroot\Root\App_Code\VBCode\Armatore.vb:35
   ArmatoreOfferta..ctor(String idutente, String idofferta) in C:\inetpub\wwwroot\Root\App_Code\VBCode\ArmatoreOfferta.vb:91
   rootBLG.LeggiIncarichiARM(String idutente, String idofferta, String lingua) in c:\inetpub\wwwroot\Root\App_Code\CSCode\rootBLG.cs:563
   It_Apply.verificaIncarichiARM(String idutente, String idofferta) in c:\inetpub\wwwroot\Root\It\Apply.aspx.cs:493
   ASP.it_apply_aspx.__DataBinding__control7(Object sender, EventArgs e) in c:\inetpub\wwwroot\Root\It\Apply.aspx:96
   System.Web.UI.Control.OnDataBinding(EventArgs e) +98
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +174
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +172
   System.Web.UI.WebControls.Repeater.AddDataItemsIntoItemsArray(IEnumerable dataSource, Boolean useDataSource) +279
   System.Web.UI.WebControls.Repeater.PostGetDataAction(IEnumerable dataSource) +104
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +80
   It_Apply.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Root\It\Apply.aspx.cs:71
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0