473,699 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.net Application Problem.

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.asc x" 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.
Nov 19 '05 #1
4 1222
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" <zu****@discuss ions.microsoft. com> wrote in message
news:5B******** *************** ***********@mic rosoft.com...
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.asc x" 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.

Nov 19 '05 #2
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" <zu****@discuss ions.microsoft. com> wrote in message
news:5B******** *************** ***********@mic rosoft.com...
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.asc x" 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.


Nov 19 '05 #3
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" <zu****@discuss ions.microsoft. com> wrote in message
news:5B******** *************** ***********@mic rosoft.com...
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.asc x" 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.


Nov 19 '05 #4
Hello Jorge Thank u for you reply:

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

//code
using System;
using System.Collecti ons;
using System.Componen tModel;
using System.Web;
using System.Web.Sess ionState;
using caribbeansearch .baseobjects;
using System.Resource s;
using System.IO;
using System.Threadin g;
using System.Web.Mail ;
namespace Zubair
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.Http Application
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.Componen tModel.IContain er components = null;
public static string applicationPath ="";
int count=0;
protected Zubair.baseobje cts.WPUIObjects component;
public Global()
{
InitializeCompo nent();
}

protected void Application_Sta rt(Object sender, EventArgs e)
{

applicationPath
=Server.MapPath (System.Configu ration.Configur ationSettings.A ppSettings["SiteRootPa th"]);
//WPDBProcedureMe taData MetaDataSPXML=n ew WPDBProcedureMe taData()
//MetaDataSPXML.L oadSPXMLStruct( applicationPath +System.Configu ration.Configur ationSettings.A ppSettings["MetaDataXM L"]);
//Thread thread = new Thread(new
ThreadStart(Zub air.baseobjects .Emailblaster.P rocessEmail ));
//thread.Start();
}

protected void Session_Start(O bject sender, EventArgs e)
{
Session.Timeout =60;
++count;
Session["VisitorsCo unt"]=count;
}

protected void Application_Beg inRequest(Objec t sender, EventArgs e)
{

}

protected void Application_End Request(Object sender, EventArgs e)
{

}

protected void Application_Aut henticateReques t(Object sender, EventArgs e)
{

}

protected void Application_Err or(Object sender, EventArgs e)
{
try
{
// component=new WPUIObjects();
// component.SendG enericEmail("in **@Zubair.com", "in**@Zubair.co m","Error
in the Site","The error description is as follows : "
+Server.GetLast Error().ToStrin g());
}
catch(Exception e1)
{
// string ss=e1.Message;
}
}

protected void Session_End(Obj ect 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 InitializeCompo nent()
{
this.components = new System.Componen tModel.Containe r();
}
#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" <zu****@discuss ions.microsoft. com> wrote in message
news:5B******** *************** ***********@mic rosoft.com...
> 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.asc x" 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.

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2765
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each other. On my application startup, I configure the objects usting the RemotingConfiguration class to load the config file. Then I "ping" each of the objects to call their constructors. This all works fine if no one is attempting to connect at the...
9
2820
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am facing. Please please help me to solve this as soon as possible. So here we go ... I am not able to take the screen shot of the windows form based "Smart
8
2746
by: Pete Wittig | last post by:
Hello, I am wondering if it is possible to create a networked application with C# that is seen as a windows user. For example, if Bob logged onto windows and then started the application, any access to the network made through the application would be seen as 'C# application user' and not 'Bob'. What I want to accomplish is to create an encrypted folder on a server where files within the folder can be accessed through the application,...
1
2577
by: CES | last post by:
All, Could someone please point me to a step by step resource on setting up a ..net Web Application on IIS. I'm having a problem setting up IIS to except a new Web Application. I'm deploying the default Asp.net Web Application as is setup by VStudio with no code changed, other then adding "Hello World to the <title> tag. I've been able to narrow down the problem to IIS by compiling the Application and deploying it to my production...
9
2450
by: William LaMartin | last post by:
I have a problem, mentioned here before, of Session and Application variables disappearing at one site but not at others or on my development computer. The problem is illustrated by an example at http://www.lamartin.com/dotnet/sessiontestset.aspx, were I set Session, Application and Cache variables on the first page and then on the second page view them as the second page is refreshed every five seconds. Before 10 refreshes, the...
5
20439
by: Lars-Erik Aabech | last post by:
Hi! Guess it's my day again.. Tried to deploy a test release of a new asp.net web today, and got a terrible error. The web is running swell on three development computers, but when it's copied to the test server it won't work at all. Looks like aspnet_wp is trying to compile it for five seconds, then it stops working what so ever. The system event log gets the following entry: Application popup: aspnet_wp.exe - Application Error : The...
9
2769
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and wizards. But, I have found that trying to do something "outside the norm" adds a rather large level of complexity and/or data replication. Background I have been commissioned to create a web-based application for a client. It has a formsaunthentication...
20
2706
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in contrast to one of them always being 'modal' (e.g., if you are moving over a picture the 'Info' form will update the (x,y) screen location in realtime even if not the selected form. Also note that this example implies the various forms can communicate...
13
4759
by: Kevin Liebowicz | last post by:
Yes, I wasted the past two days trying to fix this. Yes, this is on a Win2003 Server. Yes, this machine is a domain controller. Yes, I seen the dozens of KB articles like this one: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315158 But the problem is that 99% of these are for ASP .NET 1.x and this is .NET 2.x which I just installed to try and get .net working for the first time ever. I've see all the HACKS to get .net 1.x...
6
2262
by: Tony Johansson | last post by:
Hello! We have a C#.ASP.NET application that runs on a IIS 6. The application contains actually several asp pages but there is no GUI. The application receive an xml file that is processed. There is also an MFC dll that is called from this asp application to make a syntax check on quite many commands. You don't have to know what a command is. The problem that we get is the following when the asp pages calls the MFC
0
8685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8613
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4374
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.