Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Closed Thread
matches the 'inherits' attribute
Old 09-07-2006, 10:17 AM matches the 'inherits' attribute
Experienced Talker

Posts: 48
Trades: 0
why does this happen from time to time???????

i get lots of work done saving differnt copies of my page.

then i make a slight alteration and BOOM!!!!!!

i get this message:





Server Error in '/intranet' Application.



Compilation Error


Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).

Source Error:

Line 1:
Line 2: Partial Class secure_Default
Line 3: Inherits System.Web.UI.Page
Line 4:




why does this crap keep happening????????
__________________
regards,

Pauly.
The true sign of intelligence is not knowledge but imagination. (Albert Einstein)
Be who you are and say what you feel,
because those who mind don't matter and those who matter don't mind. (Dr. Seuss
)

Last edited by paulwebmaster; 09-07-2006 at 10:18 AM..
paulwebmaster is offline
View Public Profile
 
 
Register now for full access!
Old 09-07-2006, 02:00 PM Re: matches the 'inherits' attribute
Experienced Talker

Posts: 48
Trades: 0
for any one who wants to know.......

i sorted this out by changing the two bits of code:


===================================
in the page itself i changed:

<%@PageLanguage="VB"AutoEventWireup="false"CodeFile="home.aspx.vb"Inherits="secure_Default" %>

to

<%@PageLanguage="VB"AutoEventWireup="false"CodeFile="home.aspx.vb"Inherits="secure_home" %>

===================================
and then in the code behind the page i changed the name of the partial class to match it:

PartialClass secure_home
Inherits System.Web.UI.Page
ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As
blah blah blah

EndSub

End
Class

__________________
regards,

Pauly.
The true sign of intelligence is not knowledge but imagination. (Albert Einstein)
Be who you are and say what you feel,
because those who mind don't matter and those who matter don't mind. (Dr. Seuss
)
paulwebmaster is offline
View Public Profile
 
Old 05-24-2008, 06:48 AM Re: matches the 'inherits' attribute
Junior Talker

Posts: 1
Name: benny Sutton
Trades: 0
Did you take this any further? I've had the same problem

i had an error 'class name is ambiguous'

It seems to break when you try to reference classes from content pages in master pages or when I added a web user control

I 'cured it' by moving all the code to a new class in App_Code
Similar to your workaround

I'm not satified with that though...

< link drop removed >

Last edited by chrishirst; 05-24-2008 at 07:42 AM..
bennySutton is offline
View Public Profile
 
Old 11-06-2008, 08:41 PM Re: matches the 'inherits' attribute
Junior Talker

Posts: 1
Name: Gary Guthary
Trades: 0
Guys, whenever this happens, check your other pages. You most likely have a class duplicated somewhere else on your site. Happens all the time when retiring an old page but leaving it on the server. Make sure the class isn't declared in any other page that happens to be on the server - confuses the compiler since it doesn't know which one to use.

Pays to keep your site clean and tidy. I have spent many painful hours poring over these issues just to find out I didn't remove an obsolete page with the same class name in it.
gguthary is offline
View Public Profile
 
Old 11-06-2008, 08:46 PM Re: matches the 'inherits' attribute
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
gguthary - when you do that, add .Retired to the end of the namespace the old page lives in.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
View Public Profile
 
Closed Thread     « Reply to matches the 'inherits' attribute
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.47343 seconds with 12 queries