troubleshooting Question

ASP.net Error

Avatar of ukerandi
ukerandiFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft SharePointASP.NETC#
2 Comments1 Solution363 ViewsLast Modified:
Hi My sharepoint application geeting error below
Page Load -Index was outside the bounds of the array,Can some one show me where is error generating,
This is generating only one person machine (browser) other every one working fine. i can't debug the programme becuase its in the client side.No access at all.But i can see the error using in the error Table.( i generated Table for any error goes to that table)

 protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                LblUserLoginError.Visible = false;
                ConnectionOpen = new Site();
                LoginRights UsernameFind = new LoginRights();
            
            


                string[] CurrentUsername = UsernameFind.CurrentUserName().Split('\\');
                //=================================================================================================================================

                //  public int SalesLoginRights(string Username, string Country,out string SalesID)

             
                
                string[] HomeBackGlobal = Regex.Split(HttpContext.Current.Request.Url.ToString(), "http://");
                string Test_SalesPagePath = "~/_layouts/Test_Global/Test_Sales.aspx?Hm=" + HomeBackGlobal[1];
                //Image_Country.ImageUrl =ConnectionOpen.CountryFlag( LblCountry.Text.ToString());
                LinkDashBoard.Text = "DashBoard -" + LblCountry.Text.ToString();





                //================================================================================================================================
                //HttpContext context = HttpContext.Current;
                PropertyInfo isreadonly = typeof(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.NonPublic);
                if (!((Page)System.Web.HttpContext.Current.CurrentHandler).IsPostBack)
                {

                    if (HttpContext.Current.Request.QueryString["SalesID"] != null)
                    {
                        string tempValue = HttpContext.Current.Request.QueryString["SalesID"].ToString();
                        LblSalesID.Text = tempValue;




                        if (LblSalesID.Text.ToString() != "")
                        {
                            Sales FindTestName = new Sales();
                            string SalesPerosnFullname = FindTestName.SalesPersonName(LblSalesID.Text.ToString(), LblCountry.Text.ToString());


                            if (UserLoginType() == 1 || UserLoginType() == 3)
                            {

                                UserLogin_Properties();
                                Sales cl_SalesPersons = new Sales();

                                DataTable tbSalesPerson = cl_SalesPersons.ConvertListToDataTable(cl_SalesPersons.FillAllSalesPerson(LblCountry.Text.ToString()));
                                DropDownTest.DataSource = tbSalesPerson;

                                DropDownTest.DataTextField = "Column1";
                                DropDownTest.DataValueField = "Column1";
                                DropDownTest.DataBind();

                                DropDownTest.SelectedValue = SalesPerosnFullname;
                                Populate_DashBoard(1);

                            }
                            if (UserLoginType() == 2)
                            {

                                UserLogin_Properties();
                                Populate_DashBoard(2);
                            }
                        }


                    }


                    //=================================================================================================

                   



                }//end of Ispost 

            }
            catch (Exception PageErr)
            {
                string ErrMessage="";
              
                ErrMessage ="Page Load -"+PageErr.Message.ToString()+"Source -"+ PageErr.Source.ToString() +"StackTrace -"+ PageErr.StackTrace.ToString();
              
            
            }

        }

Hope someone can show me where is the error or how to find the where is
ASKER CERTIFIED SOLUTION
Carl Tawn
Senior Systems and Integration Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros