"Error creating control - [text] could not be set on property" with custom ASP.NET server controls in VS 2008 SP1 - by Alexander Abramov

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 361826 Comments
Status Closed Workarounds
Type Bug Repros 123
Opened 8/14/2008 6:42:29 AM
Access Restriction Public


Custom server controls have a bug in designer mode as of SP1. It was not present in Studio 2008 before service pack.

When you add your control on a web page and view it in design mode, and after that recompile a control, it stops to render in design mode. Error text "Error creating control - [text] could not be set on property" is rendered instead.

Closing and opening Visual Studio fixes the issue.

Stepping through a debugger during the first render, I see that property setter is invoked correctly. During second render property setter is not invoked.

My guess is that the issue is with caching compiled control library somewhere in Visual Studio designer internals.

I attached a demo solution.

It does not matter if the reference to controls library is file- or project- based. I tried to make two separate solutions - the same bug.

I run fully patched Windows XP SP3 under administrative account.

For controls developer this is a rather annoying issue. I basically have to close and reopen Studio each time I want to look at my changes, and that's pretty often. So I hope to find some fix or workaround.
Sign in to post a comment.
Posted by Microsoft on 6/24/2009 at 7:04 AM
Please note that there are actually two hotfixes released, as described on: http://support.microsoft.com/kb/961847

One is for Windows XP and 2009, while the other is for Windows Vista and Windows Server 2008.

Windows XP and 2003:

Windows Vista and Windows Server 2008:
Posted by Alexander Abramov on 6/24/2009 at 12:04 AM
As a last note, I left the following feedback about this issue:
- Response times were long. Fix to problem with "Rating: 4.8 after 105 ratings" took 3,5 month. And after that response to give people link to hotfix took 5 more months.
- Community discussion was ignored.
Posted by Alexander Abramov on 6/23/2009 at 11:51 PM
Hi everyone,
As you see Microsoft posted KB number and link to hotfix now. Hope it helps some of us.

I'm not sure why, but I cannot download my attached repro solution, there is just no download link. Right now I cannot reproduce the problem on my machine, but my VS installation changed a lot over last year. Maybe problem is fixed after all.

Even if I could reproduce the problem, I cannot reopen the bug. On edit page it has Status:Closed that cannot be changed.

So hennadiy, NatureNZ, and all the people who still experience this or related problem - please feel free to open another bug report and post links to it here. Thank you for your participation :)
Posted by Microsoft on 6/23/2009 at 10:57 AM

You can try visiting the following links:
Posted by Hennadiy Kurabko on 6/22/2009 at 10:26 AM
I don't know is there a possibility to reopen bug? Or this can be done onle by Alex Abramov?
Posted by Hennadiy Kurabko on 6/22/2009 at 10:19 AM
I have created ScriptControl with collection-properties, it is works fine in separate test solution. But if I embed this control into my project and pase it onto the page - bang! all my page in red error underscores. No properties was recognized by VS desiger. And I can't switch to design view.
So... after 1 year of discussion may be ever 1 people in the world know possible solution? How to fix this bug in VS?
Posted by the new ba on 4/23/2009 at 3:38 PM
and the hotfix seems broke the web user control as well, i had a web user control uses standard asp controls and ajax control. it was working well in design time and now it is got the same error again.
Posted by the new ba on 4/23/2009 at 2:56 PM
Hi, I installed the hotfix: KB961847 - "Error creating control- [text] property" ASP.NET server cntls in VS
the problem still there?

can anyone tell me if i got the wrong hotfix? or is there any hotfix i need to install as well?
Posted by TimeTrips on 4/3/2009 at 8:08 AM
Where is the fix? Unfortunately I can not control when my workstation is updated with patches and a forced update last night is now causing this problem on my development machine. From what I've read this has been around for a while and should have been fixed by now.
Posted by Damiano on 2/25/2009 at 1:30 AM

Where is the HOTFIX?
Posted by Gareth Paterson on 1/27/2009 at 8:39 AM
In the workarounds...
Posted by Alexander Abramov on 1/26/2009 at 1:53 AM
Great news that this is fixed.
Can you please provide corresponding KB number that is needed to get hotfix from support?
Or please point us to the procedure of getting the hotfix.
Posted by Mat Barrie - FDNZ on 1/24/2009 at 2:18 AM
This bug is in no way "resolved". To be resolved, there has to be a fix, and I'm not seeing one. This is a hugely annoying bug, and it needs to be fixed!
Posted by JeremyLundy on 1/16/2009 at 9:57 PM
Does anyone know why this was marked 'resolved'? I have not seen any KB number assigned to the issue. I have not seen any hotfix available to resolve the issue.
Posted by Agustin M Rodriguez on 1/13/2009 at 10:30 AM
I contacted technical support and requested the hotfix for this item per the Microsoft comment on 12/9/2008, however they are unable to provide the hotfix with out a knowldege base article. Does anyone know the KB number?
Posted by Sydney Barnard on 12/30/2008 at 6:19 AM
It seems this problem occurs in Visual Studio 2005 SP 1 as well. Once a custom control has been added to a page and the developer switches from source view to design view the control can't be created.
Posted by Muhilan on 12/16/2008 at 3:23 AM
I am also facing this problem for last 3 days. After 2 day long search in .net and doing R &D no use. Today only I found this site.
Is their any update avaiable from MS for this Bug?

is Buidling control in VS 2005 and using it in VS 2008 only solution at this time?

S. Muhilan
Posted by Microsoft on 12/9/2008 at 3:03 PM
We have investigated the issue, and will fix it in subsequent releases of our product. If you need a hotfix, please contact support directly.

Posted by Arthur Dzhelali on 12/3/2008 at 2:07 PM
Same thing, Control cannot be regenerated after page is reopened. Looks like this has something has to do with namespaces.
Any advice or help would be appreciated. I am fighting this thing for almost a month. Because of this bug design view is useless. Any advanced designers of the control cannot be utilized
Posted by VanceCollins on 12/2/2008 at 11:14 PM
Me too. This looks like it has been open for awhile. Has anyone heard anything from MS on this? I have a site that was working and now it is not.
Posted by Gareth Paterson on 11/24/2008 at 2:10 AM
I think the problem is with how it is managing the caching of control dlls. If you look at the exception being generated when you attach a debugger to VS at design time it is coming from an InvalidCastException. The problem is nothing is actually being cast it is the same Type however VS has created 2 copies of the control dll in different cache directories. My guess is somewhere when the new cached copy is being created that the old references are not being correctly (fully) updated thus some remain pointing to the older version whilst others point to the newer version. The upshot is that it sees the objects as two different Types when in fact its two distinct copies of the dll with the same Type.

Long story short, it's down to cache management. When you close and re-open VS I'm guessing that the cache is re-created / started afresh hence the problem will temporarily disapear.
Posted by John.P.Scott on 11/21/2008 at 3:26 PM
I only spotted this issue as a side effect of another issue I had. I was experiencing a problem with the UrlEditor property on a custom control, where the property was returning a path which was relative to the previous value for the path. So if the previous path was ~/folder/file.ext and I modified the value using the property editor and browsed to ~/folder/file2.ext it would return the value file2.ext. I spent the best part of a day on this until I noticed a problem with the design view of the control and searched for a fix to this instead. This article led me to restart VS2008 and bingo! the problem disappeared. It seems that the UrlProperty editor problem is linked somehow to the problem with the design time view of a control on it's page.

Has anybody else noticed this problem.
Posted by Gareth Paterson on 11/21/2008 at 8:22 AM
System.Web.HttpException was unhandled by user code
Message="'SomeTitle' could not be set on property 'Title'."
     at System.Web.UI.ControlBuilder.SetSimpleProperty(SimplePropertyEntry entry, Object obj)
     at System.Web.UI.ControlBuilder.InitSimpleProperties(Object obj)
     at System.Web.UI.ControlBuilder.InitObject(Object obj)
     at System.Web.UI.ControlBuilder.BuildObjectInternal()
     at System.Web.UI.ControlBuilder.BuildObject()
     at System.Web.UI.ControlBuilder.BuildObject(Boolean shouldApplyTheme)
     at System.Web.UI.DesignTimeTemplateParser.ParseControlsInternal(DesignTimeParseData data, Boolean returnFirst)
     at System.Web.UI.DesignTimeTemplateParser.ParseControl(DesignTimeParseData data)
     at System.Web.UI.Design.ControlSerializer.DeserializeControlInternal(String text, IDesignerHost host, Boolean applyTheme)
     at System.Web.UI.Design.ControlParser.ParseControl(IDesignerHost designerHost, String controlText, Boolean applyTheme)
     at System.Web.UI.Design.ControlDesigner.CreateClonedControl(IDesignerHost parseTimeDesignerHost, Boolean applyTheme)
     at System.Web.UI.Design.ControlDesigner.CreateViewControl()
     at System.Web.UI.Design.ControlDesigner.CreateViewControlInternal()
     at System.Web.UI.Design.ControlDesigner.get_ViewControl()
     at System.Web.UI.Design.ContainerControlDesigner.GenerateDesignTimeHtml()
     at System.Web.UI.Design.ContainerControlDesigner.GetDesignTimeHtml(DesignerRegionCollection regions)
     at BW.Web.Controls.Designers.BasePanelControlDesigner.GetDesignTimeHtml(DesignerRegionCollection regions) in C:\Visual Studio Projects\Barclays Wealth Web Controls\BW.Web.Controls\Designers\BasePanelControlDesigner.cs:line 77
     at System.Web.UI.Design.ControlDesigner.GetViewRendering(ControlDesigner designer)
InnerException: System.InvalidCastException
     Message="[A]BW.Web.Controls.SupportPortal.GroupBox cannot be cast to [B]BW.Web.Controls.SupportPortal.GroupBox. Type A originates from 'BW.Web.Controls.SupportPortal, Version=, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' at location 'C:\\Documents and Settings\\Gareth.Paterson\\Local Settings\\Application Data\\Microsoft\\VisualStudio\\9.0\\ProjectAssemblies\\3nalgayl01\\BW.web.controls.supportportal.dll'. Type B originates from 'BW.Web.Controls.SupportPortal, Version=, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' at location 'C:\\Documents and Settings\\Gareth.Paterson\\Local Settings\\Application Data\\Microsoft\\VisualStudio\\9.0\\ProjectAssemblies\\mslzrobx01\\BW.web.controls.supportportal.dll'."
            at T_GroupBox_Title_9.SetProperty(Object , Object )
            at System.Web.Util.FastPropertyAccessor.SetProperty(Object target, String propName, Object val)
            at System.Web.UI.PropertyMapper.SetMappedPropertyValue(Object obj, String mappedName, Object value)
            at System.Web.UI.ControlBuilder.SetSimpleProperty(SimplePropertyEntry entry, Object obj)
Posted by Gareth Paterson on 11/21/2008 at 3:20 AM
Could someone from Microsoft give an update on when we could expect to see a fix appearing for this. It seems a pretty major bug to leave open since August. Yes it can be worked around to some extent but it is basically rendering the design view useless.
Posted by Michel Bernier on 11/6/2008 at 10:03 AM
Just installed SP1 (without knowing about that issue before!) and I got that same problem I can't work on my ASP.net projects anymore.
Just hope MS release a patch pretty soon! We can't afford that kind of slow down.
Posted by kbrimington on 11/3/2008 at 2:39 PM
This issue has made control development very difficult. Every change requires a Visual Studio restart. The workarounds are not sufficient. When I do a clean, I lose embedded resources. After setting some properties or rebuilding the referenced project, the error crops up. We are losing a lot of man-hours to this bug. Please release a hotfix soon.
Posted by Anonymous435243543 on 10/22/2008 at 7:33 AM
I also had the same problem. However, it did not manifest itself until I started using Ajax controls inside custom Web User Controls, then using that custom Web User Control on an existing form that also contains Ajax controls. The first time I open a form with Ajax controls on it, everything works fine. But the second time I open the forms, none of the Ajax controls will render - they have errors about not being able to set a property.

I solved this problem by

1) Removing the AjaxControlLibrary.dll file from my solution (and on disk), and deleting all ajax toolboxes
2) adding the AjaxControlLibrary project directly into my solution.
3) close .Net, reopen and load solution.

Not sure if this will work for anyone else or not, but it's worth a try.
Posted by DougWithABug on 10/3/2008 at 1:26 PM
Also, please reference this information:


I also had to do this as part of my workaround.
Posted by DougWithABug on 10/3/2008 at 1:14 PM
I am also having this problem, I removed the DLL from my toolbox and the problem went away. I spend most of my time developing in source mode so it's not that big of a deal for me, but for many others in my office this is not a reasonable option.
Posted by Shadow Chaser on 10/2/2008 at 11:00 AM
Same problem here - it makes design mode completely useless. What are the plans for a hoxfix or SP2? I can't wait until 2010 for this fix.
Posted by zvonimirk.calculus on 9/20/2008 at 10:08 AM
The same problem in my web project! And what makes it worse, the controls inside a content page (linked to a master page) are not rendered even after restarting Visual Studio. I can't use web designer any more and this is really inadmissible. I just can't believe that a so obvious error could appear in a service pack and that it is not resolved yet.
Posted by Hong (MA, USA) on 9/11/2008 at 1:12 PM
I am having exactly the same problem. I am so glad that I have wasted only hafl an hour on this before finding this discussion.
Posted by jameslock on 9/5/2008 at 8:45 PM
I am having this exact problem with vs2005 (fw2.0 SP2) since i have installed visual studio 2008 Shell and vs2008 SDK! Even doing actions by 'UnitesUser' doesn't always fix it.
Posted by NuwandaKA on 9/3/2008 at 3:26 PM
Our team found the same problem, and it's having impact on our productivity. I hope that ms put focus on this issue
Posted by jdenton on 9/3/2008 at 2:01 PM
This is painful bug for our dev environment, definite 5 star......
Posted by Hong Li on 8/25/2008 at 11:24 AM
Thanks for reporting this issue. We are currently actively looking into this issue and investigating. We will follow-up with your issues.

Thank you.
Visual Studio Product Team.
Posted by UnitesWebDev on 8/22/2008 at 2:53 PM
I had this same problem with all of my VS 2008 AJAX applications before SP1. To my surprise, SP1 makes it worse! The workaround that I use is to do a Build--> Clean [Project Name]. Then do a View --> Refresh and wait patiently for several seconds and it will usually refresh the designer.
Posted by JoseLopez on 8/20/2008 at 4:46 PM
I am so glad I found your post. I did a seach in Yahoo for "error creating control could not be set on property visual studio 2008 sp1" and this post came at the top. I just installed VS2008 Professional SP1 last night and this exact thing happened in my web solution. I can also confirm that doing what is posted here (close/re-open VS) made the error go away.


Jose Lopez
Posted by Microsoft on 8/20/2008 at 2:23 PM

We are still investigating the issue and will keep you informed.

Could you use Explorer to open the folder %windir%\Microsoft.NET\Framework\v2.0.50727\ , and the right click on "System.dll", then choose "Properties". Then, go to the "Version" tab to see the file version of the file.

If you see 2.0.50727.3053, then this means you are still running the 3.5 SP1 version of the .NET Framework.
Posted by Ben S on 8/20/2008 at 4:04 AM
I wasted a day on this problem!
Posted by RickyLin on 8/20/2008 at 1:56 AM
I have the same problem,too.
Posted by Ed Sponsler on 8/15/2008 at 9:07 AM
I have the same problem with VS Express (Visual Web Developer Express) 2008 SP1, XP SP 3.
The error is generated consistently by:
-- Copy Website containing AJAX controls (such as UpdatePanel)
-- Open new copy of website
-- Observe grey backgroud error is Design view. "Error Creating Control _someControl'sID_ - _somePropertyValue_ could not be set on property _someProperty_"

The error goes away after restarting VWD 2008.
Posted by Microsoft on 8/14/2008 at 7:53 PM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com/)
Posted by Alexander Abramov on 8/14/2008 at 5:20 PM
Update 2:

I uninstalled everything I found of relevance to Visual Studio, including all versions of .net framework, SDKs, Tools for the Office system, Document Explorer, Team Explorer, SQL Server Compact Edition, Resharper, Studio itself. Then I rebooted, disabled automatic updates and reinstalled VS 2008 RTM (Professional, ENU) from DVD.

Some of my personalized settings remained, such as color scheme.

Bug is still here, but its behavior has changed. Instead of rendering gray box with error message, control just does not render anything.
So at first designer opening - '1234' as it should be; after recompilation - nothing.

I would appreciate a pointer to a doc explaining how to remove VS 2008 sp1 and related stuff completely with all registry entries, libraries, files and everything, so I can at least go back to pre-sp1.
For now I believe I don't have a good system restore point, so it seems the only option is to reinstall Windows.
Posted by Alexander Abramov on 8/14/2008 at 3:29 PM

I uninstalled Visual Studio SP1 from Add/Remove programs, now it shows version 9.0.21022.8 RTM,
but I still have this bug.

I will try uninstalling other components of the service pack until it goes away.
Posted by Alexander Abramov on 8/14/2008 at 3:27 PM
Thank you for confirming, cycleguy.
At least now I know that it is not my glitch :)

Can you please add a validation and/or rating? Probably it will help focus attention on this issue.
Posted by haroldchattaway on 8/14/2008 at 1:58 PM
Yes, I have found the same bug as of today too (8/14). I have wasted almost a day of development before googling "could not be set on property". ALso just installed VS2008 sp1.