473,698 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Could not load type 'Global'.

When I was using VS2003, I was able to compile my asp.net project locally on
my machine and copy it to the production server and it would run just fine.

I've now converted to VS2005. The project compiles & runs fine locally, but
when I copy to the production machine, I get this error:

Parser Error Message: Could not load type 'Global'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I thought perhaps I could change the Root Namespace to "WiseERP" (it was
blank), but then I can't get the project to compile. In the
aspx.designer.v b file It doesn't like Protected WithEvents HelpMain As
Global.Help I thinks it should be Protected WithEvents HelpMain As
Global.WiseERP. Help. I have about 500 pages on this site...and would like
to avoid having to change each one...just to find out this really isn't my
problems.

Thanks for your help!
Mar 19 '07 #1
8 13197
You did mark the directory WiseERP as an application correct? If not, then
the global.asax is looking for a dll in the wrong bin file. It will be
looking for D:\inetpub\wwwr oot\bin instead of the bin directory in the
WiseERP since the wwwroot is the next application up in the heirarchy.

Something else to keep in mind, if you use the Web Site project, it's not
the same as the VS 2003 web project. The Web Site project does all
compilation dynamically, which can lead to pages being compiled before
others. The Web Application Project, which was available as an add-on to VS
2005 and is now part of VS 2005 SP 1, is more akin to the VS 2003 web
project in that it compiles everything into a single dll. That could also
avoid the error you are seeing if it's a matter of timing for the
compilation.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eK******** ******@TK2MSFTN GP06.phx.gbl...
When I was using VS2003, I was able to compile my asp.net project locally
on my machine and copy it to the production server and it would run just
fine.

I've now converted to VS2005. The project compiles & runs fine locally,
but when I copy to the production machine, I get this error:

Parser Error Message: Could not load type 'Global'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I thought perhaps I could change the Root Namespace to "WiseERP" (it was
blank), but then I can't get the project to compile. In the
aspx.designer.v b file It doesn't like Protected WithEvents HelpMain As
Global.Help I thinks it should be Protected WithEvents HelpMain As
Global.WiseERP. Help. I have about 500 pages on this site...and would
like to avoid having to change each one...just to find out this really
isn't my problems.

Thanks for your help!

Mar 19 '07 #2
Sorry about my stupidity on this...

I'm assuming you're talking about the Home Directory of the IIS admin. I
hit the Remove and Create button to set this. currently the settings are:
Local Path: D:\inetpub\wwwr oot\wiseerp
Application name: Default Application
Starting point: <WiseERP>
Execute permissions Scripts only
application pool: DefaultAppPool

Also I have SP1 installed and have already "Convert to Web Application" in
VS.

"Mark Fitzpatrick" <ma******@fitzm e.comwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
You did mark the directory WiseERP as an application correct? If not, then
the global.asax is looking for a dll in the wrong bin file. It will be
looking for D:\inetpub\wwwr oot\bin instead of the bin directory in the
WiseERP since the wwwroot is the next application up in the heirarchy.

Something else to keep in mind, if you use the Web Site project, it's not
the same as the VS 2003 web project. The Web Site project does all
compilation dynamically, which can lead to pages being compiled before
others. The Web Application Project, which was available as an add-on to
VS 2005 and is now part of VS 2005 SP 1, is more akin to the VS 2003 web
project in that it compiles everything into a single dll. That could also
avoid the error you are seeing if it's a matter of timing for the
compilation.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eK******** ******@TK2MSFTN GP06.phx.gbl...
>When I was using VS2003, I was able to compile my asp.net project locally
on my machine and copy it to the production server and it would run just
fine.

I've now converted to VS2005. The project compiles & runs fine locally,
but when I copy to the production machine, I get this error:

Parser Error Message: Could not load type 'Global'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I thought perhaps I could change the Root Namespace to "WiseERP" (it was
blank), but then I can't get the project to compile. In the
aspx.designer. vb file It doesn't like Protected WithEvents HelpMain As
Global.Help I thinks it should be Protected WithEvents HelpMain As
Global.WiseERP .Help. I have about 500 pages on this site...and would
like to avoid having to change each one...just to find out this really
isn't my problems.

Thanks for your help!


Mar 19 '07 #3
re:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1
VS2005, when WAP isn't installed, doesn't use "codebehind ".

In ASP.NET version 2.0, you should instead use the CodeFile attribute
to specify the name of the source file, along with the Inherits attribute
to specify the fully qualified name of the class.

See:
http://msdn.microsoft.com/msdnmag/is...&fig=true#fig1

....for usage examples.

Also, in ASP.NET 2.0, if you use the code-behind model,
global.asax.vb must be moved to the App_Code directory.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
=============== =============== =====
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eK******** ******@TK2MSFTN GP06.phx.gbl...
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy
it to the production server and it would run just fine.

I've now converted to VS2005. The project compiles & runs fine locally, but when I copy to the
production machine, I get this error:

Parser Error Message: Could not load type 'Global'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I thought perhaps I could change the Root Namespace to "WiseERP" (it was blank), but then I can't
get the project to compile. In the aspx.designer.v b file It doesn't like Protected WithEvents
HelpMain As Global.Help I thinks it should be Protected WithEvents HelpMain As
Global.WiseERP. Help. I have about 500 pages on this site...and would like to avoid having to
change each one...just to find out this really isn't my problems.

Thanks for your help!

Mar 19 '07 #4
I thought the App_Code directory was for projects that were created in
2005...this is a conversion form 2003. ??

also, I changed the codebehind to CodeFile, I get this error:

Compiler Error Message: BC30554: 'Global' is ambiguous.
Source Error:
Line 44:
<System.Runtime .CompilerServic es.CompilerGlob alScopeAttribut e() _
Line 45: Public Class global_asax
Line 46: Inherits Global.[Global]
Line 47:
Line 48: Private Shared __initialized As Boolean
Source File: C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\root\5de7 b2a1\c4da5030\A pp_global.asax. vydatjj_.0.vb Line: 46
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
re:
>Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

VS2005, when WAP isn't installed, doesn't use "codebehind ".

In ASP.NET version 2.0, you should instead use the CodeFile attribute
to specify the name of the source file, along with the Inherits attribute
to specify the fully qualified name of the class.

See:
http://msdn.microsoft.com/msdnmag/is...&fig=true#fig1

...for usage examples.

Also, in ASP.NET 2.0, if you use the code-behind model,
global.asax.vb must be moved to the App_Code directory.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
=============== =============== =====
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eK******** ******@TK2MSFTN GP06.phx.gbl...
>When I was using VS2003, I was able to compile my asp.net project locally
on my machine and copy it to the production server and it would run just
fine.

I've now converted to VS2005. The project compiles & runs fine locally,
but when I copy to the production machine, I get this error:

Parser Error Message: Could not load type 'Global'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I thought perhaps I could change the Root Namespace to "WiseERP" (it was
blank), but then I can't get the project to compile. In the
aspx.designer. vb file It doesn't like Protected WithEvents HelpMain As
Global.Help I thinks it should be Protected WithEvents HelpMain As
Global.WiseERP .Help. I have about 500 pages on this site...and would
like to avoid having to change each one...just to find out this really
isn't my problems.

Thanks for your help!


Mar 19 '07 #5
re:
>I thought the App_Code directory was for projects that were created in 2005...this is a conversion
from 2003. ??
....which makes it a VS 2005 project, whether it was
originally created in 2005 or converted from 2003.

re:
also, I changed the codebehind to CodeFile, I get this error:
Compiler Error Message: BC30554: 'Global' is ambiguous.
You have a different "global" class defined somewhere else in your codebase.

In the new model, the Inherits attribute specifies
the fully qualified name of the class defined in global.asax.

Is that name, still, "global", or should it be something else ?
I bet it's something else.

Did you move global.asax.vb to the App_Code directory ?

Here's an idea for you : backup your current global.asax and its codebehind file,
delete them, and create a new global.asax: "File", "New", "File" ( or Control-N ) ,
and select "Global Application Class".

A global.asax template will be created...which you can modify to taste.

That new template's syntax will be correct,
and you'll only need to add the contents of your current global.asax file.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
=============== =============== =====
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:OK******** ******@TK2MSFTN GP02.phx.gbl...
>I thought the App_Code directory was for projects that were created in 2005...this is a conversion
form 2003. ??

also, I changed the codebehind to CodeFile, I get this error:

Compiler Error Message: BC30554: 'Global' is ambiguous.
Source Error:
Line 44: <System.Runtime .CompilerServic es.CompilerGlob alScopeAttribut e() _
Line 45: Public Class global_asax
Line 46: Inherits Global.[Global]
Line 47:
Line 48: Private Shared __initialized As Boolean
Source File: C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\root\5de7 b2a1\c4da5030\A pp_global.asax. vydatjj_.0.vb Line: 46
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>re:
>>Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

VS2005, when WAP isn't installed, doesn't use "codebehind ".

In ASP.NET version 2.0, you should instead use the CodeFile attribute
to specify the name of the source file, along with the Inherits attribute
to specify the fully qualified name of the class.

See:
http://msdn.microsoft.com/msdnmag/is...&fig=true#fig1

...for usage examples.

Also, in ASP.NET 2.0, if you use the code-behind model,
global.asax. vb must be moved to the App_Code directory.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
============== =============== ======
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eK******* *******@TK2MSFT NGP06.phx.gbl.. .
>>When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy
it to the production server and it would run just fine.

I've now converted to VS2005. The project compiles & runs fine locally, but when I copy to the
production machine, I get this error:

Parser Error Message: Could not load type 'Global'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I thought perhaps I could change the Root Namespace to "WiseERP" (it was blank), but then I
can't get the project to compile. In the aspx.designer.v b file It doesn't like Protected
WithEvents HelpMain As Global.Help I thinks it should be Protected WithEvents HelpMain As
Global.WiseER P.Help. I have about 500 pages on this site...and would like to avoid having to
change each one...just to find out this really isn't my problems.

Thanks for your help!



Mar 19 '07 #6
On my dev computer, I deleted the old global.asax file, created the App_Code
folder, and created a new global.asax file in the App_Code folder. The
compile works, but the application variables defined in it don't load, so I
can't run the app still

I also tried to just create the global.asax file in the root with the same
original problem (except there is now a period in front of Global):

Parser Error Message: Could not load type '.Global_asax'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits=".Glob al_asax"
Language="vb" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I'm afraid I'm going to have to cough up the $250 and call microsoft....I
have to get this project running again. Any other suggestions?
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
re:
>>I thought the App_Code directory was for projects that were created in
2005...this is a conversion from 2003. ??

...which makes it a VS 2005 project, whether it was
originally created in 2005 or converted from 2003.

re:
>also, I changed the codebehind to CodeFile, I get this error:
Compiler Error Message: BC30554: 'Global' is ambiguous.

You have a different "global" class defined somewhere else in your
codebase.

In the new model, the Inherits attribute specifies
the fully qualified name of the class defined in global.asax.

Is that name, still, "global", or should it be something else ?
I bet it's something else.

Did you move global.asax.vb to the App_Code directory ?

Here's an idea for you : backup your current global.asax and its
codebehind file,
delete them, and create a new global.asax: "File", "New", "File" ( or
Control-N ) ,
and select "Global Application Class".

A global.asax template will be created...which you can modify to taste.

That new template's syntax will be correct,
and you'll only need to add the contents of your current global.asax file.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
=============== =============== =====
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:OK******** ******@TK2MSFTN GP02.phx.gbl...
>>I thought the App_Code directory was for projects that were created in
2005...this is a conversion form 2003. ??

also, I changed the codebehind to CodeFile, I get this error:

Compiler Error Message: BC30554: 'Global' is ambiguous.
Source Error:
Line 44: <System.Runtime .CompilerServic es.CompilerGlob alScopeAttribut e()>
_
Line 45: Public Class global_asax
Line 46: Inherits Global.[Global]
Line 47:
Line 48: Private Shared __initialized As Boolean
Source File: C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\5de7 b2a1\c4da5030\A pp_global.asax. vydatjj_.0.vb
Line: 46

>"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******* *********@TK2MS FTNGP05.phx.gbl ...
>>re:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l"
%>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

VS2005, when WAP isn't installed, doesn't use "codebehind ".

In ASP.NET version 2.0, you should instead use the CodeFile attribute
to specify the name of the source file, along with the Inherits
attribute
to specify the fully qualified name of the class.

See:
http://msdn.microsoft.com/msdnmag/is...&fig=true#fig1

...for usage examples.

Also, in ASP.NET 2.0, if you use the code-behind model,
global.asax.v b must be moved to the App_Code directory.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
============= =============== =======
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eK****** ********@TK2MSF TNGP06.phx.gbl. ..
When I was using VS2003, I was able to compile my asp.net project
locally on my machine and copy it to the production server and it would
run just fine.

I've now converted to VS2005. The project compiles & runs fine
locally, but when I copy to the production machine, I get this error:

Parser Error Message: Could not load type 'Global'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l"
%>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I thought perhaps I could change the Root Namespace to "WiseERP" (it
was blank), but then I can't get the project to compile. In the
aspx.designe r.vb file It doesn't like Protected WithEvents HelpMain
As Global.Help I thinks it should be Protected WithEvents HelpMain As
Global.WiseE RP.Help. I have about 500 pages on this site...and would
like to avoid having to change each one...just to find out this really
isn't my problems.

Thanks for your help!



Mar 19 '07 #7
re:
I also tried to just create the global.asax file in the root with the same original problem
(except there is now a period in front of Global):
Did you delete the global.asax in the App_Code directory first ?

re:
I deleted the old global.asax file, created the App_Code folder, and created a new global.asax
file in the App_Code folder.
Only the code-behind file for global.asax ( global.asax.vb )
needs to go into the App_Code folder.

Global.asax itself goes in the root of your application, as usual.

Most developers have switched from a code-behind global.asax
to an inline-code global.asax, to prevent the problems you're having.

There's nothing you can do in code-behind which you can't do inline.
In fact, the *default* model for VS 2005 is now "inline", instead of "codebehind ".

Would you try that ?
( getting rid of the codebehind file and writing your global.asax events inline... )


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
=============== =============== =====
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eq******** *****@TK2MSFTNG P06.phx.gbl...
On my dev computer, I deleted the old global.asax file, created the App_Code folder, and created a
new global.asax file in the App_Code folder. The compile works, but the application variables
defined in it don't load, so I can't run the app still

I also tried to just create the global.asax file in the root with the same original problem
(except there is now a period in front of Global):

Parser Error Message: Could not load type '.Global_asax'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits=".Glob al_asax" Language="vb" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I'm afraid I'm going to have to cough up the $250 and call microsoft....I have to get this project
running again. Any other suggestions?
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>re:
>>>I thought the App_Code directory was for projects that were created in 2005...this is a
conversion from 2003. ??

...which makes it a VS 2005 project, whether it was
originally created in 2005 or converted from 2003.

re:
>>also, I changed the codebehind to CodeFile, I get this error:
Compiler Error Message: BC30554: 'Global' is ambiguous.

You have a different "global" class defined somewhere else in your codebase.

In the new model, the Inherits attribute specifies
the fully qualified name of the class defined in global.asax.

Is that name, still, "global", or should it be something else ?
I bet it's something else.

Did you move global.asax.vb to the App_Code directory ?

Here's an idea for you : backup your current global.asax and its codebehind file,
delete them, and create a new global.asax: "File", "New", "File" ( or Control-N ) ,
and select "Global Application Class".

A global.asax template will be created...which you can modify to taste.

That new template's syntax will be correct,
and you'll only need to add the contents of your current global.asax file.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
============== =============== ======
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:OK******* *******@TK2MSFT NGP02.phx.gbl.. .
>>>I thought the App_Code directory was for projects that were created in 2005...this is a
conversion form 2003. ??

also, I changed the codebehind to CodeFile, I get this error:

Compiler Error Message: BC30554: 'Global' is ambiguous.
Source Error:
Line 44: <System.Runtime .CompilerServic es.CompilerGlob alScopeAttribut e()_
Line 45: Public Class global_asax
Line 46: Inherits Global.[Global]
Line 47:
Line 48: Private Shared __initialized As Boolean
Source File: C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary ASP.NET
Files\root\5d e7b2a1\c4da5030 \App_global.asa x.vydatjj_.0.vb Line: 46

>>"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2****** **********@TK2M SFTNGP05.phx.gb l...
re:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

VS2005, when WAP isn't installed, doesn't use "codebehind ".

In ASP.NET version 2.0, you should instead use the CodeFile attribute
to specify the name of the source file, along with the Inherits attribute
to specify the fully qualified name of the class.

See:
http://msdn.microsoft.com/msdnmag/is...&fig=true#fig1

...for usage examples.

Also, in ASP.NET 2.0, if you use the code-behind model,
global.asax. vb must be moved to the App_Code directory.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
============ =============== ========
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eK***** *********@TK2MS FTNGP06.phx.gbl ...
When I was using VS2003, I was able to compile my asp.net project locally on my machine and
copy it to the production server and it would run just fine.
>
I've now converted to VS2005. The project compiles & runs fine locally, but when I copy to
the production machine, I get this error:
>
Parser Error Message: Could not load type 'Global'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb" Inherits="Globa l" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1
>
I thought perhaps I could change the Root Namespace to "WiseERP" (it was blank), but then I
can't get the project to compile. In the aspx.designer.v b file It doesn't like Protected
WithEvent s HelpMain As Global.Help I thinks it should be Protected WithEvents HelpMain As
Global.Wise ERP.Help. I have about 500 pages on this site...and would like to avoid having to
change each one...just to find out this really isn't my problems.
>
Thanks for your help!
>




Mar 19 '07 #8
Well, I finally found the problem.....emb arrased to post it, but it may help
someone else someday.

It help to set the web site to .net 2.0..... not 1.1.
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
re:
>I also tried to just create the global.asax file in the root with the
same original problem (except there is now a period in front of Global):

Did you delete the global.asax in the App_Code directory first ?

re:
>I deleted the old global.asax file, created the App_Code folder, and
created a new global.asax file in the App_Code folder.

Only the code-behind file for global.asax ( global.asax.vb )
needs to go into the App_Code folder.

Global.asax itself goes in the root of your application, as usual.

Most developers have switched from a code-behind global.asax
to an inline-code global.asax, to prevent the problems you're having.

There's nothing you can do in code-behind which you can't do inline.
In fact, the *default* model for VS 2005 is now "inline", instead of
"codebehind ".

Would you try that ?
( getting rid of the codebehind file and writing your global.asax events
inline... )


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
=============== =============== =====
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eq******** *****@TK2MSFTNG P06.phx.gbl...
>On my dev computer, I deleted the old global.asax file, created the
App_Code folder, and created a new global.asax file in the App_Code
folder. The compile works, but the application variables defined in it
don't load, so I can't run the app still

I also tried to just create the global.asax file in the root with the
same original problem (except there is now a period in front of Global):

Parser Error Message: Could not load type '.Global_asax'.
Source Error:
Line 1: <%@ Application Codebehind="Glo bal.asax.vb"
Inherits=".Glo bal_asax" Language="vb" %>
Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1

I'm afraid I'm going to have to cough up the $250 and call microsoft....I
have to get this project running again. Any other suggestions?
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******* *********@TK2MS FTNGP04.phx.gbl ...
>>re:
I thought the App_Code directory was for projects that were created in
2005...th is is a conversion from 2003. ??

...which makes it a VS 2005 project, whether it was
originally created in 2005 or converted from 2003.

re:
also, I changed the codebehind to CodeFile, I get this error:
Compiler Error Message: BC30554: 'Global' is ambiguous.

You have a different "global" class defined somewhere else in your
codebase.

In the new model, the Inherits attribute specifies
the fully qualified name of the class defined in global.asax.

Is that name, still, "global", or should it be something else ?
I bet it's something else.

Did you move global.asax.vb to the App_Code directory ?

Here's an idea for you : backup your current global.asax and its
codebehind file,
delete them, and create a new global.asax: "File", "New", "File" ( or
Control-N ) ,
and select "Global Application Class".

A global.asax template will be created...which you can modify to taste.

That new template's syntax will be correct,
and you'll only need to add the contents of your current global.asax
file.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
============= =============== =======
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:OK****** ********@TK2MSF TNGP02.phx.gbl. ..
I thought the App_Code directory was for projects that were created in
2005...th is is a conversion form 2003. ??

also, I changed the codebehind to CodeFile, I get this error:

Compiler Error Message: BC30554: 'Global' is ambiguous.
Source Error:
Line 44:
<System.Runt ime.CompilerSer vices.CompilerG lobalScopeAttri bute()_
Line 45: Public Class global_asax
Line 46: Inherits Global.[Global]
Line 47:
Line 48: Private Shared __initialized As Boolean
Source File: C:\WINDOWS\Micr osoft.NET\Frame work\v2.0.50727 \Temporary
ASP.NET Files\root\5de7 b2a1\c4da5030\A pp_global.asax. vydatjj_.0.vb
Line: 46
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2***** ***********@TK2 MSFTNGP05.phx.g bl...
re:
>Line 1: <%@ Application Codebehind="Glo bal.asax.vb"
>Inherits=" Global" %>
>Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1
>
VS2005, when WAP isn't installed, doesn't use "codebehind ".
>
In ASP.NET version 2.0, you should instead use the CodeFile attribute
to specify the name of the source file, along with the Inherits
attribute
to specify the fully qualified name of the class.
>
See:
http://msdn.microsoft.com/msdnmag/is...&fig=true#fig1
>
...for usage examples.
>
Also, in ASP.NET 2.0, if you use the code-behind model,
global.asax .vb must be moved to the App_Code directory.
>
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
=========== =============== =========
"Rob T" <RT*********@DO NTwalchemSPAM.c omwrote in message
news:eK**** **********@TK2M SFTNGP06.phx.gb l...
>When I was using VS2003, I was able to compile my asp.net project
>locally on my machine and copy it to the production server and it
>would run just fine.
>>
>I've now converted to VS2005. The project compiles & runs fine
>locally, but when I copy to the production machine, I get this error:
>>
>Parser Error Message: Could not load type 'Global'.
>Source Error:
>Line 1: <%@ Application Codebehind="Glo bal.asax.vb"
>Inherits=" Global" %>
>Source File: D:\Inetpub\wwwr oot\WiseERP\glo bal.asax Line: 1
>>
>I thought perhaps I could change the Root Namespace to "WiseERP" (it
>was blank), but then I can't get the project to compile. In the
>aspx.desig ner.vb file It doesn't like Protected WithEvents HelpMain
>As Global.Help I thinks it should be Protected WithEvents HelpMain
>As Global.WiseERP. Help. I have about 500 pages on this site...and
>would like to avoid having to change each one...just to find out this
>really isn't my problems.
>>
>Thanks for your help!
>>
>
>




Mar 19 '07 #9

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

Similar topics

1
639
by: Tyson Zwicker | last post by:
Hi, I'm suddenly unable to run any ASP.net applications. Last week everything worked. But now (Mondays!) I get the same error from _every_ application I've written: Parser Error Description: An error occured during the parsing of a resource required to service this request. Please review the following specific parse error
0
1360
by: pmud | last post by:
Hi, I have an ASP.NET project using C# code. But when I hit key F5 so that the project is compiled & run, I get the error :: Parser Error Message: Could not load type 'Consumer.Global'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="Consumer.Global" %> Source File: C:\Inetpub\wwwroot\DEMO\Roboform\global.asax Line: 1
1
397
by: clintonG | last post by:
The error is documented at MSDN but building the project as the MSDN document instructs does not resolve the issue for me. I hope others may comment about other circumstances. The actual message is: Could not load type 'theClassName.Global' Line1: <%@ Application Inherits="FeedBuilder.Global" %> Source: /appDirectory/global.asax I may not have a complete global.asax as the global.asax contains that one
4
67239
by: Neil Ramsbottom | last post by:
Hi, I have built an application using ASP.NET. I can compile and run this application fine on a development machine, and on another development machine. I tried to then run the same application on yet another development machine (were trying to get a new revision control system up and running on this project) but the application always reports 'Could not load type' when we try and run a page.
2
10476
by: Daniel Bass | last post by:
Scenario (Hardware) ---------------------- I've got an engineering source server with Win 2k on it. We use it for all the source files for our projects etc... Let's call it "Engineering" for this scenario's sake. Next, I have a test machine, again running Win 2k, we'll call it "Test", that we use to drop all our compiled applications onto for testing before release to our clients.
4
1364
by: Kiran | last post by:
Hi, I copied a whole solution from a machine to my machine. I have put the folder in a folder in E Drive. I created a virtual directory from inetmgr and browsed a folder and then a wepage from inetmgr itself. Then I get this error Could not load type 'Sample.Login'.
16
5036
by: thefritz_j | last post by:
We just converted our VS2003 1.1 VB web project (which was working fine) to VS2005 2.0 and now I get: Parser Error Message: Could not load type '<Namespace>.'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="<Namespace>." %> I've done a lot of things I've found on the web to no avial, but here are some unique things about what is happening to me.
8
18184
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project compiles & runs fine locally, but when I copy to the production machine, I get this error: Parser Error Message: Could not load type 'Global'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="Global" %> Source...
4
3708
by: Mark Brown | last post by:
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" %>
0
8598
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
9152
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9014
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
8885
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
8855
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5857
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
4358
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
3037
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
2
2320
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.