Click here to Skip to main content
16,018,458 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
hi i'm new to asp.net. now i'm trying to develope a project something related to mailfetcher. in a global asax page i got some error.  some one plz help me to solve this yaar...!

C#
Global.asax.cs


using System;
using System.Threading ;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;

namespace ASPNETChat
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

public Global()
{
InitializeComponent();
}
Timer ChatRoomsCleanerTimer=new System.Threading.Timer(new TimerCallback(ChatEngine.CleanChatRooms),null,3600000,3600000);
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)
{

}

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()
{
this.components = new System.ComponentModel.Container();
}
#endregion
}
}


i got this type of error: " The name 'ChatEngine' does not exist in the current context."


What I have tried:

I try to solve it by using the timercall back. but i don't y it s arise...
Posted
Updated 16-Mar-16 0:34am

1 solution

It's looking for a class called ChatEngine that you don't have in your project. If you do have it then you need the correct "using" at the top of the page, if you don't have it you need to add it, or add a reference to an assembly that contains it and again add the correct "using".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900