Error: Could not load type

M

Mark Brown

I have a web application that was working fine until recently. It runs just
fine in the IDE. When I try to run it from another browser, I get this
error:

Could not load type 'TestCAD.Global'

Followed by:
Line 1: <%@ Application Codebehind="Global.asax.vb"
Inherits="TestCAD.Global" %>

The source file is listed as "global.asax". TestCAD.Global doesn't exist,
but since I didn't create "global.asax", I have no idea where the reference
came from. I'd edit the file, but I have no idea what it wants to inherit
from. The program was originally writting using VS2003. I converted it to
VS2008 and it's been working fine. I recently installed the SP1 patch which
is what I suspect is the source of the problem.

Any ideas for a fix or a work-around, I'd appreciate it.

Thanks,
Mark
 
C

Cor Ligthert[MVP]

Mark,

What do you mean with the SP1 patch, I am not aware about such a thing and I
am interested in that?

Cor
 
A

Andrew Morton

Mark said:
I have a web application that was working fine until recently. It
runs just fine in the IDE. When I try to run it from another
browser, I get this error:

Could not load type 'TestCAD.Global'

Followed by:
Line 1: <%@ Application Codebehind="Global.asax.vb"
Inherits="TestCAD.Global" %>
Any ideas for a fix or a work-around, I'd appreciate it.

That doesn't look quite right compared to a VS2008-generated global.asax
file I have:

<%@ Application Codebehind="Global.asax.vb"
Inherits="ProjectName.Global_asax" Language="vb" %>

which suggests your file is missing "_asax" in the inherits (and the
Language setting). The VS2003-generated Global.asax files I have don't have
the "_asax".

Andrew
 
R

rowe_newsgroups

I have a web application that was working fine until recently.  It runsjust
fine in the IDE.  When I try to run it from another browser, I get this
error:

Could not load type 'TestCAD.Global'

Followed by:
Line 1: <%@ Application Codebehind="Global.asax.vb"
Inherits="TestCAD.Global" %>

The source file is listed as "global.asax".  TestCAD.Global doesn't exist,
but since I didn't create "global.asax", I have no idea where the reference
came from.  I'd edit the file, but I have no idea what it wants to inherit
from.  The program was originally writting using VS2003.  I convertedit to
VS2008 and it's been working fine.  I recently installed the SP1 patch which
is what I suspect is the source of the problem.

Any ideas for a fix or a work-around, I'd appreciate it.

Thanks,
Mark

You might want to open up the main dll for the site and see what class
is being created for the Global.asax.vb - typically it's either
"Global_asax" or "GlobalApplication". Once you find the name of the
class that's being created, you should be able to modify the
Global.asax to point there.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 

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