"The Controls collection cannot be modified " after a IIS restore
am 28.08.2007 01:14:01 von TomSedlacek
Hi Everyone,
I had a disk issue with my laptop last week and lost my iis metabase and
other files in that folder. I resotored that folder from a very recent
backup and got IIS working again.
Unfortunatley there is an app that does not work. Its a ASP.Net 2.0 app that
uses AJAX and the AJAX control toolkit. All of the other Asp.net 2.0 apps and
Ajax apps on this laptop still work.
The error I get is below:
[HttpException (0x80004005): The Controls collection cannot be modified
because the control contains code blocks (i.e. <% ... %>).]
System.Web.UI.ControlCollection.Add(Control child) +2105903
AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences (Control
control) +648
AjaxControlToolkit.ScriptControlBase.OnPreRender(EventArgs e) +222
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
I have tried taking the code for this app from a server that is running
fine, unfortunatley no help.
Does anyone have any idea what the issue could be? If I canât find a
resolution soon I am going to have to rebuild the laptop.
Any help would be much appreciated.
Regards,
Tom Sedlacek
Network Software Analyst
Dmg Radio Australia
Re: "The Controls collection cannot be modified " after a IIS restore
am 28.08.2007 06:55:10 von Ken Schaefer
This doesn't appear to be an IIS issue. Have you tried clearing any
temporary ASP.NET files, and otherwise ensuring that IIS is configured
correctly (so that the application is loading the correct binaries?)
Cheers
Ken
--
My IIS Blog: www.adOpenStatic.com/cs/blogs/ken
"Tom Sedlacek" wrote in message
news:E14710A4-67BD-4250-A65A-7EB82C137B3F@microsoft.com...
> Hi Everyone,
>
> I had a disk issue with my laptop last week and lost my iis metabase and
> other files in that folder. I resotored that folder from a very recent
> backup and got IIS working again.
>
> Unfortunatley there is an app that does not work. Its a ASP.Net 2.0 app
> that
> uses AJAX and the AJAX control toolkit. All of the other Asp.net 2.0 apps
> and
> Ajax apps on this laptop still work.
>
> The error I get is below:
>
> [HttpException (0x80004005): The Controls collection cannot be modified
> because the control contains code blocks (i.e. <% ... %>).]
> System.Web.UI.ControlCollection.Add(Control child) +2105903
> AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences (Control
> control) +648
> AjaxControlToolkit.ScriptControlBase.OnPreRender(EventArgs e) +222
> System.Web.UI.Control.PreRenderRecursiveInternal() +77
> System.Web.UI.Control.PreRenderRecursiveInternal() +161
> System.Web.UI.Control.PreRenderRecursiveInternal() +161
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
>
> I have tried taking the code for this app from a server that is running
> fine, unfortunatley no help.
>
> Does anyone have any idea what the issue could be? If I canât find a
> resolution soon I am going to have to rebuild the laptop.
>
> Any help would be much appreciated.
>
> Regards,
>
> Tom Sedlacek
> Network Software Analyst
> Dmg Radio Australia
>
>
>
Re: "The Controls collection cannot be modified " after a IIS rest
am 28.08.2007 07:10:03 von TomSedlacek
Hi Ken,
Thanks for your reply. I've tried to clear the temp files and am pretty sure
that my config is okay.
I've just managed to get it fixed by rolling back to the last version of the
AJAX Controls Toolkit. The strange thing is that I have been running the new
version for serveral months before the disk issue without any issues. I've
also been using it with the web app without any issues.
So not really sure what is actually going on.
For now I will use the old Controls Toolkit and when I have time I will
rebuild my laptop when I get the chance.
Thanks again for your comments...
Cheers
Tom Sedlacek
Network Software Analyst
Dmg Radio Australia