locked
Timeout expired. The timeout period elapsed prior..... RRS feed

  • Question

  • I have increased the Connection Timeout property as well as the Max Pool size and am still having this problem.  I have not designed this app and it appears to me after reading the forums there needs to be some conn.Open and conn.Close statements inserted into the c# coding.  I have inserted a code snippet and would appreciate it if someone could give me some places where these items need to be inserted.  Thanks
     if (!(Page.IsPostBack))
        {
    
          // show correct view
          if (Convert.ToInt32(role["customer_contact"]) == 1)
          {
            if (Request.QueryString["v"] == "1")
            {
              mv1.ActiveViewIndex = 1;
            }
            else
            {
              mv1.ActiveViewIndex = 0;
    
              HtmlLink linkRss = new HtmlLink();
              linkRss.Href = "~/feeds/ReferredToMeFeed.aspx";
              linkRss.Attributes["type"] = "application/rss+xml";
              linkRss.Attributes["rel"] = "alternate";
              linkRss.Attributes["title"] = "Referred to Me Feed | Sales Referral System";
              Page.Header.Controls.Add(linkRss);
            }
          }
          else
          {
            mv1.ActiveViewIndex = 1;
          }
    
          if (mv1.ActiveViewIndex == 1)
          {
            // Build controls for Tracking 
    
            // build ddlMonth
            ddlMonth.Items.Add(new ListItem("All", "All"));
            for (int i = 1; i <= 12; i++)
            {
              ddlMonth.Items.Add(new ListItem(System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.AbbreviatedMonthNames[i - 1].ToString(), i.ToString()));
    
            }
            ddlMonth.SelectedValue = DateTime.Today.Month.ToString();
    
    
            // build ddlYr
            for (int y = Convert.ToInt32(DateTime.Today.Year); y >= 2004; y--)
            {
              ddlYr.Items.Add(new ListItem(y.ToString(), y.ToString()));
              gvTrackMyReferrals.Caption = "Referrals for " + ddlMonth.SelectedItem.ToString() + " " + ddlYr.SelectedItem.ToString();
            }
    
            // Show "Track My Referrals"
            SqlDataSource sqlTrackMyReferrals = (SqlDataSource)mv1.Views[1].FindControl("sqlTrackMyReferrals");
            sqlTrackMyReferrals.SelectParameters["empid"].DefaultValue = empId;
            sqlTrackMyReferrals.SelectParameters["submit_date"].DefaultValue = DateTime.Now.ToShortDateString();
    
            LoadSummaryData("Month", DateTime.Now.ToShortDateString());
    
          }
          else if (mv1.ActiveViewIndex == 0)
          {
            // build ddlMonthQ
            ddlMonthQ.Items.Add(new ListItem("All", "All"));
            for (int i = 1; i <= 12; i++)
            {
              ddlMonthQ.Items.Add(new ListItem(System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.AbbreviatedMonthNames[i - 1].ToString(), i.ToString()));
    
            }
            ddlMonthQ.SelectedValue = DateTime.Today.Month.ToString();
    
    
            // build ddlYrQ
            for (int y = Convert.ToInt32(DateTime.Today.Year); y >= 2004; y--)
            {
              ddlYrQ.Items.Add(new ListItem(y.ToString(), y.ToString()));
              gvTrackMyReferrals.Caption = "Referrals for " + ddlMonthQ.SelectedItem.ToString() + " " + ddlYrQ.SelectedItem.ToString();
            }
    
            gvTrackReferredToMe.Caption = "Current Pending Referrals";
            SqlDataSource sqlTrackReferredToMe = (SqlDataSource)mv1.Views[0].FindControl("sqlReferredToMe");
            sqlTrackReferredToMe.SelectParameters["empid"].DefaultValue = empId;
          }
    
        }
    
      }

    Brett The Jet
    • Moved by Cookie Luo Friday, April 1, 2011 5:33 AM (From:Visual C# General)
    Wednesday, March 30, 2011 1:39 PM

All replies