Errore server nell'applicazione '/'.

L'origine non contiene DataRows.

Descrizione: Eccezione non gestita durante l'esecuzione della richiesta Web corrente. Per ulteriori informazioni sull'errore e sul suo punto di origine nel codice, vedere la traccia dello stack.

Dettagli eccezione: System.InvalidOperationException: L'origine non contiene DataRows.

Errore nel codice sorgente:


Riga 13:         DataSet ds = new DataSet();
Riga 14:         ds.ReadXml(MapPath("/xml/portfolio.xml"));
Riga 15:         DataTable dt = ds.Tables[0].Select("id='" + id + "'").CopyToDataTable();
Riga 16: 
Riga 17:         DataTable dts = new DataTable();

File di origine: e:\vhosts\fabiodeledda.it\httpdocs\portfolio.aspx.cs    Riga: 15

Traccia dello stack:


[InvalidOperationException: L'origine non contiene DataRows.]
   System.Data.DataTableExtensions.LoadTableFromEnumerable(IEnumerable`1 source, DataTable table, Nullable`1 options, FillErrorEventHandler errorHandler) +1211
   System.Data.DataTableExtensions.CopyToDataTable(IEnumerable`1 source) +67
   portfolio.Page_Load(Object sender, EventArgs e) in e:\vhosts\fabiodeledda.it\httpdocs\portfolio.aspx.cs:15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Informazioni di versione: Versione di Microsoft .NET Framework:4.0.30319; Versione di ASP.NET:4.8.4700.0