I'm recently working on a asp.net web application. that use linq to sql ORM to data access layer (DAL). In a specific case of my queries faces with stackoverflow exception on clr Level.
i use filter expression generator to get specific data (such as load with specific constrient) that we send more than 1500 parameters to the store procedure.
NOTE: we consider RPC (Remote Procedure Calling) limitation that's exactly 2100 parameters in sql server default setting.
but i don't know why i face with stackoverflow exception? it's interesting to know this problem only occur on iis and no problem in asp.net web development server.
and i'm nearly find out problem that be caused the large number of parameters.
i was grateful from someone that help me?

public List<HSEPersonnelComplexPaging> SelectHSEPersonnelPaging(PagingPropertiesDTO pagingProps, out int recCount)
{
using (HRPaidTimeOffDataContext db = new HRPaidTimeOffDataContext(DBHelper.GetConnectionString()))
{
Expression<Func<HSEPersonnelComplexPaging, bool>> expr =
PredicateBuilder.GetFilterExpression<HSEPersonnelComplexPaging>(pagingProps);
db.DeferredLoadingEnabled = false;
var items = from at in db.HSEPersonnels
where at.IsDeleted == false
select new HSEPersonnelComplexPaging
{
ID = at.HSEPersonnelId,
PersonnelyNo = at.PersonnelyNo,
Name = at.Name,
Family = at.Family,
BirthPlace = at.BirthPlace,
Birthdate = at.Birthdate,
Father = at.Father,
IdNo = at.IdNo,
NationalCode = at.NationalCode,
IsNotActive = at.IsNotActive,
IsDeleted = at.IsDeleted,
InsertDate = at.InsertDate,
UpdateDate = at.UpdateDate,
InsertENTUserAccountId = at.InsertENTUserAccountId
};
var result = items.Where(expr);
recCount = result.Count();
return
result.ApplySortExpression(pagingProps.SortSet).Skip(pagingProps.CurrentPageIndex *
pagingProps.CurrentPageSize).Take(
pagingProps.CurrentPageSize).ToList();
}