locked
timeout RRS feed

  • Question

  • User-492280791 posted

    Dear Developers,

     I'm looping through all controls from a placeholder. It's filled with lot's of controls.
    When I loop I insert a record, this process takes a long time...

     What to avoid timeout of my page?

    Monday, July 21, 2008 10:44 AM

Answers

  • User-1679385778 posted

    try to change timeout value in IIS settings.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 22, 2008 5:21 AM

All replies

  • User1617320364 posted

    When you say insert a record do you mean you are executing an insert statement for a database?

    I would run through this loop and build a single insert that way you are not making all of those trips to the database.  My guess is this excessive network traffic is causing the page to time out.

    Another idea would be to run this part on a seperate thread.

    Monday, July 21, 2008 10:51 AM
  • User-492280791 posted

    This is my statement, how can i improve it?

     

    1            foreach (Control chk in PhOPBOUW.Controls)
    2            {
    3                if (chk.GetType() == typeof(CheckBox))
    4                {
    5                    if (((chk as CheckBox).Checked) && (chk.ID.ToString().StartsWith("chk")))
    6                    {
    7                        if (ViewState["OwnerMail"] != null)
    8                        {
    9                            if (ViewState["ActionID"] != null)
    10                           {
    11                               //selected wordt op 1 gezet als er een mail verzonden wordt
    12   
    13                               VUID = DB.getViaUserID(ViewState["OwnerMail"].ToString());
    14                               DB.insertLijst(ViewState["ActionID"].ToString(), chk.ID.Substring(3).ToString(), int.Parse(VUID));
    15   
    16                           }
    17                           else
    18                           {
    19                               LogFilerFunctions.LogFiler.ToLog("Viewstate actionid is null!!!");
    20   
    21                           }
    22                       }
    23                       else
    24                       {
    25                           LogFilerFunctions.LogFiler.ToLog("viewstate OwnerMail is null!!!");
    26                       }
    27                   }
    28               }
    29           }
    
     

     

    Tuesday, July 22, 2008 2:30 AM
  • User-1679385778 posted

    try to change timeout value in IIS settings.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 22, 2008 5:21 AM