.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:
  #16  
Old May 6th, 2004, 09:14 PM
cymonp cymonp is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 cymonp 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 cymonp
Thumbs up Parser Error - WORKS!!! Try this. Thanks to saghari.

Quote:
Originally Posted by 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



Keep up the good work!

Take Care,
Cymon

Reply With Quote
  #17  
Old May 6th, 2004, 09:17 PM
cymonp cymonp is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 cymonp 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 cymonp
I have try the Crtl+Shift+B then Recompile/Rebuild the solution. For so many times I've ask and seek for the answer. THIS MADE ME HAPPY. IT WORKS. I recommend it.

Reply With Quote
  #18  
Old May 14th, 2004, 03:39 PM
Anubi Anubi is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 Anubi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Please... this is frustrating

Hello everyone,

I tried everything above, but I still can't solve it.

Code:
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="TestTreeView.WebForm1" %>

Error:

Server Error in '/TestTreeView' 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 'TestTreeView.WebForm1'.

Source Error:

Line 1: <%@ Import NameSpace="Microsoft.Web.UI.WebControls"%>Line 2: <%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>Line 3: <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="TestTreeView.WebForm1" %>Line 4: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >Line 5: <HTML>
Source File: c:\inetpub\wwwroot\TestTreeView\WebForm1.aspx Line: 3


Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0


Can someone come up with another solution?

Oh, and before I got this error, I got a not that I had to delete <add assembly="*"/>
from the machine.config file.
Maybe that has something to do with it?

Greets and thx to all on advance.

Reply With Quote
  #19  
Old May 27th, 2004, 08:37 PM
lanzdale lanzdale is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 1 lanzdale User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The dll bin folder is relative to IIS

If you're sure you've got the new version complied and in the bin folder,
( try ildasm on it to be sure names are correct, I made
a shortcut in my SendTo folder) , check one other important thing.

The bin folder is an IIS Virtual folder, not just a Windows folder.
I fixed a similiar problem by copying that whole application to a temp
location, then in IIS MMC, Delete the virtual folder.
(It deletes the real folder too, that's why you copy 1st.) , then
copy back and in IIS MMC again New / Virtual Directory, give same name,
point to it.

(Also be sure to record/remake any IIS directory properties like certificates.)

Don't ask me why there's nothing of this on the Microsoft site (or
why it's so hidden). It's so obvious an error.

Reply With Quote
  #20  
Old June 10th, 2004, 03:00 AM
KarlXII KarlXII is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Stockholm
Posts: 1 KarlXII User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi everyone !

I had this problem also and most of the given solutions didn´t work for me, until I actually found out that I had to edit the row
"Inherits="WSUtbImport.Global" %>"
to add the prefix of my actual project name like:
"Inherits="xxx.xxx.xxx.WSUtbImport.Global" %>"

Then after rebuilding solution it worked just fine. Thank you to Manos to lead me in the correct direction for this one.

Reply With Quote
  #21  
Old November 14th, 2004, 08:25 PM
Brazenheart Brazenheart is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 Brazenheart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I had this same problem but for yet a different reason. I was converting an ASP.Net Visual Studio project to a command line build. I setup a batch file to run vbc and construct the assembly. The library compiled fine, but when I ran it, I would get the "could not load type" error on every page.

After a variety of efforts, I decided to load up the dll in a disassembler and compare it to the dll I had created under Visual Studio. It turns out that all the pages reference as their classes something like the following: <Namespace of project>.<Codebehind class> (e.g. project1.index), but in the disassembler I could see that the namespace was "-", so even though all the classes were there, the pages weren't looking for the right namespace. I added the command line argument "/rootnamespace:<namespace of my project>" and the problem was solved.

I don't know how many of you compile asp.net libraries from the command line, but this might help give you an idea of the nature of the "could not load type" error.

Reply With Quote
  #22  
Old December 2nd, 2004, 11:11 AM
vongthep vongthep is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 11 vongthep User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 26 m 55 sec
Reputation Power: 0
Using VB.NET and getting error?

Quote:
Originally Posted by tulsatoldwing
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.


Check this link out. Worked for me

http://support.microsoft.com/defaul...kb;en-us;312311

Last edited by Shadow Wizard : January 5th, 2005 at 11:11 AM.

Reply With Quote
  #23  
Old December 29th, 2004, 05:06 AM
rytterqvist rytterqvist is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 1 rytterqvist User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Iis

The following solved the problem for me (running the VB.NET project locally):

Go to folder
C:\Inetpub\wwwroot

Rename the folder where your solution is PROJECT.OLD

In IIS, right click on Standard Web, New, Create a new Virtual Catalog.

Create a new Virtual Catalog named as your old solution PROJECT

Go to folder
C:\Inetpub\wwwroot

Copy the files from PROJECT.OLD to PROJECT

Thats all!

Reply With Quote
  #24  
Old January 4th, 2005, 10:42 PM
m_corby m_corby is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 m_corby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
My problem was resolved when I replaced the machine.config.

In the end I narrowed it down to the below line in the ProcessModelAttributes section.

Username = 'SYSTEM'

instead of Username = '[user]'

Reply With Quote
  #25  
Old January 5th, 2005, 11:16 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
enough said in this thread... time to close it - more than enough possible solutions. if anyone wants to share another solution send me message.

Last edited by Shadow Wizard : January 5th, 2005 at 11:20 AM.

Reply With Quote
  #26  
Old January 12th, 2005, 03:34 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,836 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2Folding Points: 544103 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 13 h 54 m 20 sec
Reputation Power: 2389
Post

--suggested solution by slymonkey:

The cause for this error is that the name in the Inherits statement of the html, i.e.
Code:
Inherits="<projectname>.<something>"

does not match the name of the public class it is looking for. If you view the code for the page that is causing the error the name in the inherits section and the name of the Public Class (right at the top of your code) won't be the same. What is needed is to name them both the same, doesn't matter what you name them. You could name the Public Class as follows
Code:
Public Class IhaveCheekyMonkeysInMyPants
 End Class

As long as the inherits statement in the html matches as follows
Code:
Inherits="<projectname>.IhaveCheekyMonkeysInMyPants"

you are good to go.

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 5 Hosted by Hostway
Stay green...Green IT