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)
                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)

                                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.SelectedValue = SalesPerosnFullname;

                            if (UserLoginType() == 2)





                }//end of Ispost 

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


Open in new window

Hope someone can show me where is the error or how to find the where is
LVL 10
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Miguel OzSoftware EngineerCommented:
Please provide which line in Page_load  fails and the stack trace generated by the error.
Carl TawnSystems and Integration DeveloperCommented:
Well the error is indicating an array indexing issue, so the first obvious line that could trip that would be:
string Test_SalesPagePath = "~/_layouts/Test_Global/Test_Sales.aspx?Hm=" + HomeBackGlobal[1];

Open in new window

But potentially any of your other function calls could have tripped it too, if they don't have any local exception handling at least.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.