Inherits

G

Guest

Using visual studio.net I have made a set of aspx web forms. They work on the
iis webserver but when moved to the web I get a Inherits error. can some one
help out.

here is the code at the top of the first webform
<%@ Page language="c#" Codebehind="1.aspx.cs" AutoEventWireup="false"
Inherits="OArugby2.index" %>

If someone can guide me in the right direction.
 
P

Peter Chadwick (MCP)

Hi,

Have you compiled the web application and copied the generated .dll
file(s) onto the webserver along with the aspx pages? They'll be in a
bin folder in your website folder.
Regards,

Peter Chadwick (MCP)
(e-mail address removed)
 
G

Guest

jonathan said:
Using visual studio.net I have made a set of aspx web forms. They work on the
iis webserver but when moved to the web I get a Inherits error. can some one
help out.
Have to deployed the assembly in the bin folder to the new web server?
This assembly contains the classes for all your codebehind classes.

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,


Please remember that ASP.NET is not like ASP , it needs to be compiled,
Once you compile your project it will create a bin directory where you will
find at least one dll with the same name than the web project.

If you want to install the web app in another server you have two solutions
1- Copy the entire directory like c:\inetpub\www\MyWebApp to the server ,
that will copy all the necesary files.
2- Create a setup project and include the Project Output files of the web
app

The first solution will copy your source files as well ( .cs ) even if they
are not needed.


cheers,
 
C

Cor Ligthert

Ignacio,

Sorry this is not true in my opinion.
Please remember that ASP.NET is not like ASP , it needs to be compiled,
Once you compile your project it will create a bin directory where you
will find at least one dll with the same name than the web project.
You can do it without a dll as well, see the bunch of samples about that.

That is confusing a lot of people. When you use VSNet you automaticly
compile, when you use by example the samples in GodDotNet you see scripting
ASPX.

The most confusing is that it seems as if there are two worlds, both using
ASPX and don't know about each other. (Strict are there three, there is as
well a group which really using the classic asp with aspx by using the
inline code and there is a group who does it clean and seperate the aspx
code on the page from the html code.)

Cor
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Cor Ligthert said:
Ignacio,

Sorry this is not true in my opinion.

Yes it's, even if you do not use code behind, the pages are classes that
ARE compiled when they are first accessed, from that moment the "file" is
not used anymore, unless there is a change in the file; in that situation
the page/class are recompiled.

So there is a compilation involved, always.

Besides the original post DOES use code behind, so he needs to compile the
project BEFORE deploy it to the production server, otherwise the code
behind's classes will not be compiled.
You can do it without a dll as well, see the bunch of samples about that.
That is confusing a lot of people. When you use VSNet you automaticly
compile, when you use by example the samples in GodDotNet you see
scripting ASPX.


You don't automatically compiled in VSNET, you do if you need to like when
using code behind ( most of the time ); you can use VSNet and use scripting
only. VSNet is only a environment that facilitate the process of create a
project.



Cheers,
 
C

Cor Ligthert

Ignacio,

You did not answer this what you stated.

And this is than an answer when I said that this sentence is not true
Yes it's, even if you do not use code behind, the pages are classes that
ARE compiled when they are first accessed, from that moment the "file" is
not used anymore, unless there is a change in the file; in that situation
the page/class are recompiled.

So there is a compilation involved, always.
So you want to tell now that ASP is not compiled?

However for me it is not important, I wanted to inform you about it.
Therefore when you keep it with your statement, feel cool. It is not my
problem.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top