Server Error in '/' Application.

The statement terminated. The maximum recursion 100 has been exhausted before statement completion.

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.Data.SqlClient.SqlException: The statement terminated. The maximum recursion 100 has been exhausted before statement completion.

Source Error:


Line 83:     Sub Repeater_prodotti_databind(Optional ListMarcaIDs As List(Of Integer) = Nothing, Optional Ordinamento As AppProdottoService.Enum_prodottoDTOOrdinamento = Enum_prodottoDTOOrdinamento.NOME)
Line 84: 
Line 85:         oList = AppProdottoService.GetAppProdotti_DTO(PageFunctions.GetLingua, , ListMarcaIDs, CategoriaID, 0, 10000000, _RicercaLibera, Ordinamento, , IsOfferta)
Line 86: 
Line 87:         If _querystringNumeroPagina > 1 And (_querystringNumeroPagina - 1) * _pageSize >= oList.Count And _querystringNumeroPagina * _pageSize > oList.Count Then

Source File: C:\inetpub\wwwroot\CastagnaSpa\UserControls\Result.ascx.vb    Line: 85

Stack Trace:


[SqlException (0x80131904): The statement terminated. The maximum recursion 100 has been exhausted before statement completion.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2586154
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6039978
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +297
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4477
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +59
   System.Data.SqlClient.SqlDataReader.get_MetaData() +91
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +446
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2698
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +1611
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +65
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +251
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +43
   System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +12
   System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +450

[EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.]
   System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +519
   System.Data.Objects.ObjectContext.CreateFunctionObjectResult(EntityCommand entityCommand, ReadOnlyMetadataCollection`1 entitySets, EdmType[] edmTypes, MergeOption mergeOption) +153
   System.Data.Objects.ObjectContext.ExecuteFunction(String functionName, MergeOption mergeOption, ObjectParameter[] parameters) +322
   System.Data.Objects.ObjectContext.ExecuteFunction(String functionName, ObjectParameter[] parameters) +59
   CastagnaSpa.DATAMODEL.MyContextApp.AppProdotto_DTO(Nullable`1 linguaID, Nullable`1 prodottoID, String marcheID, Nullable`1 categoriaID, Nullable`1 prezzoMin, Nullable`1 prezzoMax, String ricercaLibera, Nullable`1 isRandomCategoria, Nullable`1 isOfferta, Nullable`1 prodottoIDEscluso, Nullable`1 categoriaIsCanonical) +2307
   CastagnaSpa.BUSINESS.AppProdottoService.GetAppProdotti_DTO(Enum_Lingua Lingua, Int32 ProdottoID, List`1 MarcaIDs, Int32 CategoriaID, Decimal PrezzoMin, Decimal PrezzoMax, String RicercaLibera, Enum_prodottoDTOOrdinamento Ordinamento, Boolean IsRandomCategoria, Int32 IsOfferta, Int32 ProdottoIDEscluso, Int32 CategoriaIsCanonical) +977
   UserControls_Result.Repeater_prodotti_databind(List`1 ListMarcaIDs, Enum_prodottoDTOOrdinamento Ordinamento) in C:\inetpub\wwwroot\CastagnaSpa\UserControls\Result.ascx.vb:85
   UserControls_Result.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\CastagnaSpa\UserControls\Result.ascx.vb:315
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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