Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
we are unable to trace out the issue .
please help us in this .



when I do iisreset its working for 20 minutes . After 20 minutes again it showing up error page.

please find the Stack Tracing here:

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +190
System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +26
System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +80
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.4214; ASP.NET Version:2.0.50727.4209
Posted
Updated 17-Sep-11 4:54am
v2

There isn't a whole lot we can do - we don't have your code, or any idea what is happening in the twenty minutes or so you say is the period between this problem occurring. I would recommend that you run it in the debugger, and try to see what object is null when the exception occurs.

Anything else would be total guesswork!
 
Share this answer
 
Comments
ravi teja .k 11-Sep-11 9:59am    
we already debug our code we host host on local IIS its working fine as we intended . when we moved it production server its showing up error, when we typed url as http://www.onestopmotors.com/
and its working fine when we give url as
http://www.onestopmotors.com/Homepage.aspx
we already added the page Homepage.aspx to the default documents in iis and moved it on the top

Thanks,
Ravi Teja.K
Sergey Alexandrovich Kryukov 12-Sep-11 0:27am    
No, you did not "already debug" the code, apparently.
Run the code under debugger.
--SA
Sergey Alexandrovich Kryukov 12-Sep-11 0:26am    
Correct, my 5.
--SA
Sergey Alexandrovich Kryukov 12-Sep-11 0:32am    
I added my recommendation on how to dump the full call stack in exception dump, please see.
--SA
In addition to the correct answer by Griff:

You did not really provided a stack trace of this exception. Do the following:

Catch exceptions on the top of your stack and create full exception dump. Save the dump in some file or System Log using System.EventLog. If you do it in debug configuration, it will also show you the line numbers in your source code. (In more general case, catch all exceptions on the top of stack in each of your threads, do the same as above.)

—SA
 
Share this answer
 
The 20 minutes give me an idea, even if you don't provide any information:

20 minutes is the default time for the session to time out. Could it be that you store something in the session which disappears at the end of the session? If you then use the session to get something you have stored there without checking first, you will get exactly this kind of error.

Edit: And yes, use the debugger to find out where exactly the error occurs and what object has a null reference.
 
Share this answer
 
v2

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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