Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

Cannot view subclassed Page in Visual Designer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Slimeman - 15 Jul 2005 07:36 GMT
When I create a BasePage class in either the same or separate assembly,
create a Web Form that inherits from BasePage, and then attempt to view my
Web Form in the visual designer, I get the following error:

----------

The designer could not be shown for this file because none of the classes
within it can be designed.  The designer inspected the following classes in
the file:

WebForm1 --- The base class 'SubclassPage.BasePage' could not be loaded.
Ensure the assembly has been referenced or built if it is part of the project.

----------

This problem seems only to occur with Visual Studio 2003 on Windows XP. I'm
not sure whether its related to the service pack of either product.

Other posts with the same problem exist, and I have scoured the web, however
I have not seen a solution to the problem.

Has anyone solved this issue?

Thanks
Karl Seguin - 15 Jul 2005 14:28 GMT
I assume your base class is abstract.  It's a known issue.  In order the
work, the visual designer [attempts] to create an instance of all relevant
classes...this is obviously not possible for abstract class.  The best
option is to make your base class non-abstract...or use some other
technique..such as composition...

Karl

Signature

MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)

> When I create a BasePage class in either the same or separate assembly,
> create a Web Form that inherits from BasePage, and then attempt to view my
[quoted text clipped - 24 lines]
>
> Thanks
Slimeman - 15 Jul 2005 15:19 GMT
Cheers for the reply Karl.

My base class is not abstract. The simplest of examples replicates the
problem. Do you know of a solution? A Web Form inheriting from a base page
class runs fine, its just the designer that is the problem.
Karl Seguin - 15 Jul 2005 15:23 GMT
No, I've tried the simple setup and the designer works fine for me.  That
specific error, as I said, is known to happen when the base class is
abstract.  I've not seen anyone else report it under different situations.
Have you tried it on a different machine?  You are welcomed to zip up a
simple example and mail it to my email (remove all the removes ;) )

Karl

Signature

MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)

> Cheers for the reply Karl.
>
> My base class is not abstract. The simplest of examples replicates the
> problem. Do you know of a solution? A Web Form inheriting from a base page
> class runs fine, its just the designer that is the problem.
Slimeman - 20 Jul 2005 05:03 GMT
The solution that solved this problem for me was to adjust the Local Intranet
Zone's Trust Level to Full Trust in the .Net Configuration Tool. Just in
case, it can be found under Administrative Tools in the Start Menu. I'm
assuming that as my home directory is on a mapped network drive, the .Net
Code Access Sucurity Runtime was disallowing access.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.