Re: ASP.net Application Problem.



Hello Jorge Thank u for you reply:

here is the code of "global.ascx" plz check this and help me figureout the
problem, I would be greatfull.

//code
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using caribbeansearch.baseobjects;
using System.Resources;
using System.IO;
using System.Threading;
using System.Web.Mail;
namespace Zubair
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
public static string applicationPath="";
int count=0;
protected Zubair.baseobjects.WPUIObjects component;
public Global()
{
InitializeComponent();
}

protected void Application_Start(Object sender, EventArgs e)
{

applicationPath
=Server.MapPath(System.Configuration.ConfigurationSettings.AppSettings["SiteRootPath"]);
//WPDBProcedureMetaData MetaDataSPXML=new WPDBProcedureMetaData();
//MetaDataSPXML.LoadSPXMLStruct(applicationPath+System.Configuration.ConfigurationSettings.AppSettings["MetaDataXML"]);
//Thread thread = new Thread(new
ThreadStart(Zubair.baseobjects.Emailblaster.ProcessEmail ));
//thread.Start();
}

protected void Session_Start(Object sender, EventArgs e)
{
Session.Timeout=60;
++count;
Session["VisitorsCount"]=count;
}

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)
{
try
{
// component=new WPUIObjects();
// component.SendGenericEmail("info@xxxxxxxxxx","info@xxxxxxxxxx","Error
in the Site","The error description is as follows : "
+Server.GetLastError().ToString());
}
catch(Exception e1)
{
// string ss=e1.Message;
}
}

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
}
}

//end code.

thanx and regards.

"Jorge L Matos [MCSD.NET]" wrote:

> Alvin is right, the error is coming from your code, please post some sample
> code thats in your global.ascx and maybe someone can help you.
>
> "zubair" wrote:
>
> > Hello again!
> >
> > It does not solve my problem bcz if there is problem in code then why it
> > works f9 on my local server.
> >
> > If another solution plz, I wud be greatful. thanx and regards.
> >
> >
> > "Alvin Bruney [MVP - ASP.NET]" wrote:
> >
> > > null reference exceptions are a result of flakey code. Use the stack trace
> > > to find out which line of code is causing the problem and fix it.
> > >
> > > --
> > > Regards,
> > > Alvin Bruney - ASP.NET MVP
> > >
> > > [Shameless Author Plug]
> > > The Microsoft Office Web Components Black Book with .NET
> > > Now available @ www.lulu.com/owc
> > > "zubair" <zubair@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > > news:5B6B6725-653E-4A96-ACAC-D3E5CDA81D5D@xxxxxxxxxxxxxxxx
> > > > Hello everyone!
> > > > I have uploaded my site on a webserver. Some times it works fine but some
> > > > time it gives error "Null Object reference exception".
> > > > The same site on my local server works just fine.
> > > >
> > > > When I change the "global.ascx" and ".dll" file in "bin" directory, it
> > > > starts working fine but after some time, same problem arises again :(.
> > > >
> > > > Can any one help me plz in figuring out the problem, and I wud highly
> > > > appreciate your suggestions and recommendations.
> > > >
> > > > Thanks in anticipation.
> > >
> > >
> > >
.



Relevant Pages

  • Re: MCSE 2003
    ... > Can you tell me the structure of the MCSE 2003 exams, plz ...
    (microsoft.public.cert.exam.mcse)
  • Help in VHDL!!!
    ... designed in VHDL???if yes plz reply immediately to ma yahoo ID...its ... Regards, ... Harish. ...
    (comp.lang.vhdl)
  • Re: An Api that lists the applications used by the a user
    ... Best Regards, ... > Plz tell me about an api that enlists the applications runned by a user ...
    (microsoft.public.win32.programmer.kernel)
  • Re: MCSE 2003
    ... > Can you tell me the structure of the MCSE 2003 exams, plz ...
    (microsoft.public.cert.exam.mcse)