Explain the @Page

E

et

I have a program that I started as a directory in wwwroot, now I want to
move it to be a subfolder of another web project, renaming the directory it
is located in. I used Copy Project to copy the project to the new
subdirectory, and uploaded the new directory to my ISP.

When opening the new page, I received the error that the program had to be
configured as a virtual directory. Since I can't do that on the ISP's
machine, I deleted the web.config file in that subdirectory.

Now I am getting the error:

Parser Error Message: Could not load type 'WebApplication8._default'.
Source Error:
Line 1: <%@ Page Language="vb" AutoEventWireup="false"
Codebehind="default.aspx.vb" Inherits="WebApplication8._default"%>

My project is still named WebApplication8, and the start page is still named
default.aspx, so why am I getting this error? What is it referring to when
it's saying Inherits="WebApplication8._default"?


Thanks for any explanation that will help.
 
S

Scott Allen

It's looking for a class (WebApplication8._default) that on your local
machine lives in the dll in the bin subdirectory. This class has the
compiled code from the code behind file (default.aspx.vb).

When you copy this project to the server and don't configure it's
directory as a virtual directory, ASP.NET can no longer find that
compiled code. It will be looking in the parent's /bin directory.

Do you need this project to be a seperate application? Most ISPs will
configure a new vdir for you when asked.
 

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