Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > The file failed to load in the Web Form designer ... Unable to cast object of type myServicedComponentClass ...

Reply
Thread Tools

The file failed to load in the Web Form designer ... Unable to cast object of type myServicedComponentClass ...

 
 
Henry
Guest
Posts: n/a
 
      10-20-2003
I have a user control that inherits from a base user control class. I can
view and edit the base user control in the designer. However, my child user
control fails to load in the web form designer. The error looks like this:

The file failed to load in the Web Form designer. Please correct the
following error, then load it again: An exception occured while trying to
create an instance of baseUserControl. The exception was "Unable to cast
object of type myServicedComponentClass to type myServicedComponentClass. "
..

I get no build errors, and my webforms with all their user controls function
properly when browsed.


 
Reply With Quote
 
 
 
 
Henry
Guest
Posts: n/a
 
      10-20-2003
Nevermind, i fixed it. In my 'baseUserControl' i moved the
'myServicedComponentClass' from being a class member to within a function.
VS.Net can now modify all the child classes in the designer.

"Henry" <> wrote in message
news:EETkb.12538$.. .
> I have a user control that inherits from a base user control class. I can
> view and edit the base user control in the designer. However, my child

user
> control fails to load in the web form designer. The error looks like this:
>
> The file failed to load in the Web Form designer. Please correct the
> following error, then load it again: An exception occured while trying to
> create an instance of baseUserControl. The exception was "Unable to cast
> object of type myServicedComponentClass to type myServicedComponentClass.

"
> .
>
> I get no build errors, and my webforms with all their user controls

function
> properly when browsed.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'. adupuis@dublin.ie ASP .Net 2 08-31-2007 12:51 PM
Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'. kroyce@ups.edu ASP .Net Security 0 05-01-2007 01:50 PM
Unable to cast object of type 'System.Web.UI.WebControls.SqlDataSource' to type 'System.Collections.IEnumerable'. Chris ASP .Net 1 02-12-2007 04:42 PM
Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'. jlecain@free.fr ASP .Net 0 08-03-2006 06:00 PM
file failed to load in web form designer steve ASP .Net 0 08-12-2003 11:04 AM



Advertisments