C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Error: "Parser Error Message: Could not load type 'WebApplication1.Global'." when browsing an asp.ne


Posted Date: 13 Sep 2006    Resource Type: Articles    Category: Web Applications
Author: Harish RanganathanMember Level: Gold    
Rating: Points: 10



Introduction


You may receive the following error when browsing an asp.net application

"Parser Error Message: Could not load type 'WebApplication1.Global'."

Source Error:

Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="'WebApplication1.Global'" %>

Why this error occurs?


This error occurs when you create a new web application in asp.net using visual studio.net and without compiling the application, you try to browse a page in the application.

This occurs because of the Application DLL not having been formed.

Asp.net will look in the Global Assembly Cache, and then in the application's local bin directory. If it can't find the class with the name you specified then it won't load. When you do a codebehind file in Visual studio, you are writing a base class for your aspx file to inherit from - the HTML template you write in the aspx is inlined into the dynamically generated subclass's Render method.

Even if you don't put any code in your page, you still need to compile it as long as you put the Inherts Webappname.Global in your Page directive.

Resolution


To resolve this, Built the application using Ctrl + Shift + B or use F5 to build the application and then try to browse the application. The error will be resolved.

Applies To


This is applicable to .NET 1.0, 1.1 versions - Visual Studio.NET

Summary


This article discussed on solving the error "Parser Error Message: Could not load type 'WebApplication1.Global'." that occurs when working with ASP.NET




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Error: "It is an error to use a section registered as allowDefinition='MachineToApplication'....
Previous Resource: Forms Authentication - Redirecting users to a Page other than Default.aspx
Return to Discussion Resource Index
Post New Resource
Category: Web Applications


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use