Could Not Load Type 'MyNameSpace.Global'
Hi All,
I am doing the Project under ASP.Net with C# code Behind.
I am getting this Parsing error and i cant execute the guidelines made from other forums like "Add new code group under .net framework 1.1 configuration" .
It asks me to modify the source file in Global.asax.
Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="GroupBarOutLookSample.Global" %>
My Namespace is GroupBarOutLookSample .
Please help me on this ...
thanks,
G.Pradeep
Hi ALL,
I rectified the error.the problem was i made the like 'GroupBarOutLookSample/cs/GroupBarOutLookSample' ..
This is the error caused due to this.'GroupBarOutLookSample/cs/GroupBarOutLookSample' --> this is the Application i created it.So the Path name and the application Name resembles the same.So i got the error.
Now i rectified it.
Thanks....
Hi, could anyone help me?
i have the same problem, the same error message appears : Could not load type "project1.Global"
in Global.asax :
<%@ Application Codebehind="Global.asax.cs" Inherits="project1.Global" %>
in Global.asax.cs :
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;namespace project1
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
public Global() {InitializeComponent();} protected void Application_Start(Object sender, EventArgs e) { }
protected void Session_Start(Object sender, EventArgs e) { }
protected void Application_BeginRequest(Object sender, EventArgs e){}
protected void Application_EndRequest(Object sender, EventArgs e){}
protected void Application_AuthenticateRequest(Object sender, EventArgs e){ }
protected void Application_Error(Object sender, EventArgs e)
{
new ErrorLog(Server.GetLastError());
// in that class, the error is passed in a Exception type variable
// and inserted in a xml file.
}
protected void Session_End(Object sender, EventArgs e){ }
protected void Application_End(Object sender, EventArgs e){} #region
Web Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent(){}
#endregion
}
}
I found on other forums that there must be a complied dll library in the \bin directory. But, because i have an express edition of the webdeveloper studio, i cannot compile any projects, i.e. i cannot build any dll to get the error solved.
Reason for what i need the codebehind file for Global.asax is that i want to handle error messages and log them to a xml file, for this i use the Application_Error() event.
All done exept this error.
In my opinion - stupid problem.
Simple create Folder "App_Code" in your solution and copy Global.aspx.cs in this folder.
This solve your problem.
P.S. I can't understand why this nessesary.