Server Error in '/Normelombardia' Application.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

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: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:


Line 2255:        Business.Documento docDaVisualizzare = new Business.Documento();
Line 2256:        docDaVisualizzare.LoadFromIds(Request.QueryString["iddoc"].ToString(), numeroProdotto);
Line 2257:        Business.Parte ParteSelezionata = docDaVisualizzare.Parti.Item(0);
Line 2258:
Line 2259:        //Crea l'oggetto visualizzazione web per la trasformazione dell'xml in html

Source File: \\file01\nir$\accessibile\main.aspx.cs    Line: 2257

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index) +11509237
   Business.Parti.Item(Int32 Indice) +8
   accessibile_main.visualizzaSommario() in \\file01\nir$\accessibile\main.aspx.cs:2257
   accessibile_main.Page_Load(Object sender, EventArgs e) in \\file01\nir$\accessibile\main.aspx.cs:273
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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