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

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

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

    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.


    Henry Guest

  2. Similar Questions and Discussions

    1. how to type cast getjsobject form vb.net to c#
      how to type cast getjsobject form vb.net to c#
    2. How to cast cfquery object to type java.util.Map
      In the LiveDocs it says: "..The following table lists how ColdFusion converts ColdFusion data values to Java data types when passing arguments. The...
    3. using text file to load my cast ......
      I have a projector file that loads a web page first and then a swf movie and then some power point slides.How can I make a text file that shows me...
    4. file failed to load in web form designer
      since deriving my class for a web form from an abstract class I get the following error when tryinh to load the page in the designer 'The file...
    5. failed to load in the web form designer...
      I have web pages that inherit from a custom page class. I now get the following error: "The file failed to load in the web form designer. ......
  3. #2

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

    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" <henry@s.com> wrote in message
    news:EETkb.12538$W77.1262@bignews6.bellsouth.net.. .
    > 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.
    >
    >

    Henry Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139