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 373:
Line 374:
Line 375:                                        Dim oAppProdotto_DTO As CastagnaSpa.DATAMODEL.AppProdotto_DTO = CastagnaSpa.BUSINESS.AppProdottoService.GetAppProdotti_DTO(PageFunctions.GetLingua(_lingua), _prodottoID, , _categoriaID).FirstOrDefault
Line 376:
Line 377:

Source File: C:\inetpub\wwwroot\CastagnaSpa\global.asax    Line: 375

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) +978
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in C:\inetpub\wwwroot\CastagnaSpa\global.asax:375
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +144
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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