473,609 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with inheritance of code behind page

I am using Visual Studio with code behind to build files within an
application. The name of the project is bsecsSql.

Everything works fine on the local computer when I use 'copy project'
to copy it to a folder and use an address such as :
http://cms2/bsecsloc/management/elec...teDetails.aspx

but when I upload it to an internet server and attempt to access a
page eg
http://www.bsecs.org.uk//management/...eDetails.aspx:

I get the message
""Could not load type 'bsecsSQL.candi dateDetails" with the following
line outlined in red as an error line

<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="can didateDetails.a spx.vb"
Inherits="bsecs SQL.candidateDe tails" Trace="true" %>

This is presumably because the address after 'Inherits' is
"bsecsSQL.candi dateDetails". However I cannot get the page to work if
I merely put in
inherits"candid ateDetails".

My question is how can ,I within or outside Visual Studio 2003,
configure the 'inherits' property so that it will work with the URL
shown above as well as on the local machine?

Best wishes, John Morgan
Nov 18 '05 #1
3 1347
Hi,

Inherits set the name of the class that page compilation process use to
derive the class create from aspx declaration from. So Inherits got
nothing to do with path.

ASP.NET looks for this class in the DLL generate for pages code behind
classes. it looks like you didn't copy that DLL to the Bin directory. or
that classes use other assemblies that didn't load to the server.

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
"John Morgan" <jf*@XXwoodland er.co.uk> wrote in message
news:lj******** *************** *********@4ax.c om...
I am using Visual Studio with code behind to build files within an
application. The name of the project is bsecsSql.

Everything works fine on the local computer when I use 'copy project'
to copy it to a folder and use an address such as :
http://cms2/bsecsloc/management/elec...teDetails.aspx

but when I upload it to an internet server and attempt to access a
page eg
http://www.bsecs.org.uk//management/...eDetails.aspx:

I get the message
""Could not load type 'bsecsSQL.candi dateDetails" with the following
line outlined in red as an error line

<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="can didateDetails.a spx.vb"
Inherits="bsecs SQL.candidateDe tails" Trace="true" %>

This is presumably because the address after 'Inherits' is
"bsecsSQL.candi dateDetails". However I cannot get the page to work if
I merely put in
inherits"candid ateDetails".

My question is how can ,I within or outside Visual Studio 2003,
configure the 'inherits' property so that it will work with the URL
shown above as well as on the local machine?


John, I bet it wouldn't work even on another machine on your LAN. I don't
think it's a problem with the URL.

Where is the assembly containing bsecsSQL.candid ateDetails? Did you put it
into the bin directory of the target server?

If you add a reference for that assembly, I think Copy Project will copy it
to the right place for you.
--
John Saunders
johnwsaundersii i at hotmail
Nov 18 '05 #3

Thank you John and Natty for your help.

No, the bin directory was not in the bin directory of the target
server! Going on what you said I changed the location of the bin
directory from bsecs/management/ to bsecs/ , the target server and
this got things working together with moving global.asax into the root
bsecs folder.

I then decided to delete the'management' folder and copy the files
and folders of the project directly into the root bsecs folder and
this works OK.

However I think what I should have done is to add a reference in the
project properties as John was suggesting and I could then have used
my original folder configuration.

I really do appreciate the help I get from this forum,

Best wishes, John Morgan
On Mon, 14 Jun 2004 23:47:46 +0100, John Morgan
<jf*@XXwoodland er.co.uk> wrote:
I am using Visual Studio with code behind to build files within an
application. The name of the project is bsecsSql.

Everything works fine on the local computer when I use 'copy project'
to copy it to a folder and use an address such as :
http://cms2/bsecsloc/management/elec...teDetails.aspx

but when I upload it to an internet server and attempt to access a
page eg
http://www.bsecs.org.uk//management/...eDetails.aspx:

I get the message
""Could not load type 'bsecsSQL.candi dateDetails" with the following
line outlined in red as an error line

<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="ca ndidateDetails. aspx.vb"
Inherits="bsec sSQL.candidateD etails" Trace="true" %>

This is presumably because the address after 'Inherits' is
"bsecsSQL.cand idateDetails". However I cannot get the page to work if
I merely put in
inherits"candid ateDetails".

My question is how can ,I within or outside Visual Studio 2003,
configure the 'inherits' property so that it will work with the URL
shown above as well as on the local machine?

Best wishes, John Morgan


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3031
by: | last post by:
Hi, I'm trying to use the cookie munging session handling behaviour of asp.net instead of cookies themselves as I'm finding quite a few people are barring cookies (especially AOL users). If I change the setting in web.config everything seems to work fine as long as I'm using relative paths. The problem is I've got a menuing system that's generated from a site-wide template - so I use a fixed path from the application root - (ie:...
0
1367
by: Dan | last post by:
I posted a similar post regarding problems with VS.NET design mode. I fixed that problem (with much thanks to this newsgroup) but now I have a second problem. I have created a class called BasePage that inherits from System.Web.UI.Page so that I can implement a "template" for all pages in an app. My BasePage class is in a class library project and there is also a web app in the same solution that has a project reference back to the...
5
2042
by: Invalidlastname | last post by:
Hi, I just read the pattern "Design and Implementation Guidelines for Web Clients" from MSDN. Here is my question. In chapter 3, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/diforwc-ch03.asp , the article mentions using page inheritance to maintain common page layout. We currently use page inheritance approach to segment the function areas. In each function area, there is a base page to provide the common...
3
3341
by: Dan | last post by:
Hi, I have a problem using an aspx page with a Control on it. I get the following error message Compiler Error Message: CS1595: 'Test.Class2' is defined in multiple places; using definition from 'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\1f575646\ad3a161b\assembly\dl2\57ca505e\044565c0_f84fc401\Test1.DLL' The problem is that the control is defined in two different assemblies
1
1026
by: Craig Street | last post by:
Hi How do i create a base page in ASP.NET 2.0? I don't want to use master pages as I don't need any visual inheritance. You could do this simply in ASP.NET 1.1 by creating a base page that inherted form System.Web.UI.Page and the ensuring that all of your pages inherited from your own base pages. With the advent of partial classes this seems somewhat more difficult.
1
928
by: Mark | last post by:
In version 1.1, I've got numerous code behinds that inherit from a class we've developed that inherits from the the Page class. How will this work in Whidbey? With partial classes used for code behinds, where/how can I modify the class that a code behind inherits from? In the express web version, I don't even see the line of code where the code behind inherits from the Page class?? Thanks in advance.
3
1187
by: Jim Heavey | last post by:
Hello, my company has a standard format that I must follow when creating a page. The top portion of the page contains a standard heading which should be placed on each page. This "heading" has a form and some javascript which has "action" which invokes some javascript. I am trying to figure out how I can standardize this so that I do not have to copy this code to each and every page. I thought I might be able to use a "User Control",...
3
1796
by: Eugene | last post by:
I'm trying to write a class which uses BinaryWriter as its base but allows for queuing of write requests Public Class QueuedBinaryWriter Inherits BinaryWriter I override all the Write methods like so: Public Overloads Overrides Sub Write(ByVal Value As Byte) m_Queue.Enqueue(New WriteRequest(MyBase.BaseStream.Position, Value)) End Sub 'same for all other Write variants
1
1275
by: bill | last post by:
What's up with inheritance in code behind? Is it reliable, or should I skip it and forget about using inheritance in web forms until they get it right? I'm using VB.NET 2005 I have a web form named wfBase.aspx. In the code behind I have Partial Public Class wfBase
0
8091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8555
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8232
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7024
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6064
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5524
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4032
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.