Code Behind Problems

  • Thread starter Thread starter Poppy
  • Start date Start date
P

Poppy

When I run ANY new page in the browser it keeps saying

"Could not load type '_MYPROJECT.admin_test'."
Line 1: <%@ Page Language="vb" AutoEventWireup="false"
Codebehind="admin_test.aspx.vb" Inherits="_MYPROJECT.admin_test"%>


No matter how many new pages I add I always get the same problem.

Has my solution become corrupted ?

Can I fix it ?
 
Are you using compiled DLLS for your CodeBehind, or are you using scripted
classes?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
First: Are you either hitting debug or compiling the application prior to
hitting the page?
http://support.microsoft.com/default.aspx?scid=kb;en-us;306155&Product=NETFrame
http://support.microsoft.com/default.aspx?scid=kb;en-us;308143&Product=NETFrame

Assuming that is not it, I assume the project is named "_MYPROJECT", as that
is the namespace. If that is not the name of the project, there is something
messed up with the namespaces on the page, which can be fixed by editing the
proper namespace (by default, project name) into the @ directive. Either
way, it seems there is a disconnect between namespace and the auto gened
namespace in the @ directive (meaning it thinks your project is _MYPROJECT,
but it is really something else.

I would not personally name a project _MYPROJECT, if that is the case, and
that could also be an issue.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
All other .net applications run fine.

It is this 1 project.
When I add any new webpage I get the same error
"Could not load type '_MYPROJECT.admin_test'."
Line 1: <%@ Page Language="vb" AutoEventWireup="false"
Codebehind="admin_test.aspx.vb" Inherits="_MYPROJECT.admin_test"%>

I have had to resort to a backup which is a week old.

I have lost a lot of work.
 
I have the same problem.

If you try to debug it using step into, the error message says:

cannot start to debug it on Web server. Catastrophic failure...

More thoughts?
 
I had this happen when I tried to add a virtual folder in the project.
Example:

MyRoot is the root of my App. I wanted MyFolder to be it's own application
independant of MyRoot, so I went into The comaputer manger and on MyFolder I
pushed the 'Create' button to create it's own application setting. This
turns it into a virtual web, under MyRoot. However, I went back to my app
and I received the same error. So, did you create a virtual web in you app
lately?

Since it happened to me, lately, it's fresh on my mind ;-)

All you have to do is press the remove button. But then you can't have
that extra virtual...

Andrea
 
It could have something to do with the Codebehind value
and the Inherits value in the .asp and .aspx pages not
matching the page name. If you copy a page, using it as a
template, then rename it, the references in the <@ Page
directive don't get changed automatically.
 
I solved the problem by creating a new project with a new name. I then
added the aspx pages one at a time.

I still dont know what caused the problem but creating a new project seems
to solve it.

Thanks for all your help.
 
Back
Top