.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 14th, 2003, 03:27 PM
tulsatoldwing tulsatoldwing is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Tulsa, Ok, USA
Posts: 1 tulsatoldwing User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Parser Error Message: Could not load type

I have seen this error reported numerous times in different forums, but haven't found the solution to my particular problem yet. I have created a few sample ASP.net apps, from a book I am studying, and haven't had any trouble compiling and running my apps, until recently. Now I get the following error when I create a new ASP.NET Web Application (VB.net) in VS.net, and "Start" the application.

-----------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'WebApplication2.Global'.

Source Error:

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

Source File: c:\inetpub\wwwroot\WebApplication2\global.asax Line: 1
---------------------------------------------------------------

It doesn't matter whether I add web controls to the form or not. I haven't knowingly changed anything about my environment since I was previously able to compile and run ASP.NET apps. And I'm not changing any of the default code that is generated by VS.NET before I attempt to start the application.

The suggestion solution to this error usually contains a warning that the application has not been built or is not located in the bin subdirectly of the virtual directory. But my app IS being built (WebApplication2.dll) and IS located in the bin subdirectly of my virtual directory.

I would appreciate any suggestions.

Reply With Quote
  #2  
Old August 6th, 2003, 04:49 AM
LeonJollans LeonJollans is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 27 LeonJollans User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
IIS Application?

Is WebApplication2 configured as an application in IIS?

Reply With Quote
  #3  
Old August 28th, 2003, 12:49 PM
runprn runprn is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Texas
Posts: 7 runprn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to runprn
Question Setting IIS Application Not Solving Problem

I am having the same problem, but setting the IIS application variable does not resolve the problem. Any other suggestions?

Reply With Quote
  #4  
Old September 5th, 2003, 02:49 PM
saghari saghari is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Iran
Posts: 1 saghari User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to saghari Send a message via Yahoo to saghari
Hi
Oh, I had this problem for new web forms added to solution, but after a short navigating in VS menu I found the solution --> Ctrl +Shift +B you should "rebuild solution" from "Build" menu.

Regards

Reply With Quote
  #5  
Old September 9th, 2003, 09:14 AM
sejohns1 sejohns1 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 2 sejohns1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I found that by moving your global files into the bin folder within the project, this problem is taken care of. In the solution explorer click on "show all files" and drag the global files into the foler.

Reply With Quote
  #6  
Old September 9th, 2003, 09:58 AM
LeonJollans LeonJollans is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 27 LeonJollans User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Don't do this

All it achieves is to remove the page (Global.asax) that asks the application for an instance of YourApp.Global. As it's not in the application's root any more it won't be invoked at the beignning of any request. It's bound to remove the error since the class will never be loaded. You may as well delete Global.asax to achieve this result.

It doesn't address the class loader issue, just stops the class being loaded at all.

Reply With Quote
  #7  
Old September 25th, 2003, 09:43 PM
daprodu daprodu is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 daprodu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up

I had the same problem with one of my projects. After searching on Internet I found on Microsoft site this article URL.
I have tried to build the solutions ( VS) but nothing worked. Finally I deleted the 'dll' from bin folder and I compiled again.
Worked !

Last edited by daprodu : September 25th, 2003 at 09:45 PM.

Reply With Quote
  #8  
Old October 3rd, 2003, 06:20 AM
namfar namfar is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 namfar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks daprodu

This error out of the blue started occuring for me I pulled my hair out until I tried all sorts, rebuilding restarting services, blah blah, until after reading your post I deleted the dlls and rebuilt the app it started working again. Sounds like VS got its nickers in a twist!

Thanks again, hopefully my hair will start to grow back!

R

Reply With Quote
  #9  
Old December 10th, 2003, 10:05 AM
shovavnik shovavnik is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 1 shovavnik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
In case anybody else encounters this error, I felt I should post my solution. I have been trying for two days to solve it, and the tip someone gave on one of the forums helped me out.

We have a very large application and our clients are using various versions. When they encounter a bug that we cannot pinpoint right away on an older version, we have to load it on out dev platforms in order to debug it. The simplest method we've found to do this, is to modify the relevant paths in IIS and reload and compile in VS.NET.

So I recently had to do this, and when I finished, I tried to reload the newest dev version. Everything compiled ok, but one of the projects returned this error. Someone posted a tip about problems in the Project properties dialog. So I opened it up and found that the file share path under Web Settings had an extra slash that had not been there before.

That is, the path was:
D:\Dir1\Dir2\IISRoot\\SolutionDir\ProjectDir

Removing the extra slash, closing the studio, reopening and compiling solved the problem.

Hope that helps.

Reply With Quote
  #10  
Old January 5th, 2004, 04:13 PM
nomi55 nomi55 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Islamabad
Posts: 1 nomi55 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi

The same error was occuring, i tried many things as discussed above when i finally noticed that my bin directory was named cgi-bin. When i renamed it to bin, site started working.


Reply With Quote
  #11  
Old January 18th, 2004, 02:42 PM
jwk4946 jwk4946 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 jwk4946 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

I have been trying for two days to resolve this same problem - please anyone I'm really getting desperate!

Things I've tried
Rebuild Project - many times
Rebuild Solution - many times
delete dll from bin & rebuild - 3 times
delete entire bin dir & rebuild - 2 times
Rebuild solutions and project - 10 more times
remove problem file from solution, rebuild, add problem file back rebuild - 2 times
Change dir to application in IIS
remove application - different error
change back to application - same error

have read tech notes referred to in this thread - either not applicable or did not help at all. e.g. rebuild project....

Help please!

Reply With Quote
  #12  
Old January 20th, 2004, 03:58 AM
Stefan Haan Stefan Haan is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 Stefan Haan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
my solution to the problem

I had the same problems while i was developing a webapplication and a webservice.
My cause of the problem was that i changed the Output Path in the project properties for the Debug and Release configuration.
I thought i was handy to build the Debug version of the dll's to \bin\Debug and the Release version of the dll's to \bin\Release.
But for some reason IIS and/or VS does not understand to not only look in the \bin directory but also in the other directories.

I guess the general solution is to see if your latest build dll's are in the correct bin directory right under the directory where global.asax is.

Good luck

Reply With Quote
  #13  
Old March 23rd, 2004, 11:03 AM
manos manos is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: Canada
Posts: 1 manos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I found another answer

Hi, just thought I'd share my answer to this frustrating problem.

Basically what I found was that for some reason, the class names that my .aspx pages where inheriting from were wrong. What happened
was that when checking the project in to source control, I had actually named my solution "Something.Net". This meant that all my
code behind inheritance directives said "Something.Net.class". (i.e. Something.Net._default) This may have been a problem.

When I noticed that, I recreated the solution as just "Something" and copied the files from the old solution. I then had to go in to the .aspx files
and change the page directives so that the pages inherited from Something._default.

After that it worked fine.

Good luck.

Reply With Quote
  #14  
Old April 28th, 2004, 03:18 PM
KaptKos KaptKos is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Highland, IN
Posts: 5 KaptKos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to KaptKos
Machine.Config

I had the same problem today and wanted to thank you for posting what resolutions everyone came up with. Mine however; did not work using any of the above suggestions. Instead; I had to copy the file C:\WINNT\MICROSOFT.NET\FRAMEWORK\VER....\CONFIG\MA CHINE.CONFIG from the production server (which was working fine) to the developer server (which somehow got corrupted)

I tried adding a reference to SYSTEM.WINDOWS.FORMS.DLL and found it didnt work so when I removed the reference; that is when I started getting the error message.


Best,
KaptKos

Reply With Quote
  #15  
Old May 6th, 2004, 12:31 AM
arfanameer arfanameer is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 arfanameer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up I got solution at last.

I too faced the same problem and finally looking over this thread , I found that the problem lies in the configuration of the project in folder in IIS. After fixing it, application is running like a horse.

Reply With Quote
Closed Thread

Viewing: ASP Free ForumsProgramming.NET Development > Parser Error Message: Could not load type


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT