Skip to content

My website has a new error!! i don't change anything!!!

Bahar Jalali

Asked Jul 28, 2012, 7:51 AM EDT2 answers
Share
LinkedInX
today a website that i support it, face a new error! the language in url is changed and i don't know why that happend. it changed from  http://fcc.gov.ir/ to http://fcc.gov.ir/default.aspx?lang=pe  automatically! my default language is farsi, but it seems that it changes to persian!! also both of them are the same but it make a bad error on site. and disaster is that when i change the text in url to http://fcc.gov.ir/default.aspx?lang=fa  it shows pages but some page have error 

here is the error page 
i don't know what must i do :(
please help me about that. thanks a lot


Server Error in '/pill sookhti' Application.


The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 

[HttpException (0x80004005): The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.]

   System.Web.UI.ControlCollection.RemoveAt(Int32 index) +8755827

   System.Web.UI.ControlCollection.Clear() +33

   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +23

   System.Web.UI.Control.EnsureChildControls() +87

   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +23

   System.Web.UI.Control.FindControl(String id) +12

   System.Web.UI.WebControls.DataBoundControlHelper.FindControl(Control control, String controlID) +75

   System.Web.UI.WebControls.DataBoundControl.GetDataSource() +8568622

   System.Web.UI.WebControls.DataBoundControl.ConnectToDataSourceView() +37

   System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +19

   System.Web.UI.Control.LoadRecursive() +50

   System.Web.UI.Control.LoadRecursive() +141

   System.Web.UI.Control.LoadRecursive() +141

   System.Web.UI.Control.LoadRecursive() +141

   System.Web.UI.Control.LoadRecursive() +141

   System.Web.UI.Control.LoadRecursive() +141

   System.Web.UI.Control.LoadRecursive() +141

   System.Web.UI.Control.LoadRecursive() +141

   System.Web.UI.Control.LoadRecursive() +141

   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 


Version Information: Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET Version:2.0.50727.4971

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    It looks like problem is in your code. If you have a database behind it, make sure it is working and connected properly. Good idea to debug your code by connecting to the database and step through it.
    0
  • 0
    thanks, but i didn't changed the website since 1 month ago! so it might not be error in the code, and i have sql database on the host and connect to it by remote connection string, when i run the site local (throw sql database on the host) the error occure again! so i think the error is in the database. because it's a portal site and all options are editable from database
    0