ASP.NET Problem with return to home page

C

Charlie J

I have a real stumper. I added a server side table to a home page that has
two other server side tables on it that have been working great. In Visual
Studio everything works great. When I put the page on the production server,
the first time in the page works great. If I navigate to any other page on
the site and then try to return to the home page the control I added throws
the following:

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.]
MAFE.home.LoadBWOM()
MAFE.home.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +761

If I comment out the line of code where I store a row in the new table, all
works just fine. Anyone have any ideas?
 
M

Mike Brind

Charlie said:
I have a real stumper. I added a server side table to a home page that has
two other server side tables on it that have been working great. In Visual
Studio everything works great. When I put the page on the production server,
the first time in the page works great. If I navigate to any other page on
the site and then try to return to the home page the control I added throws
the following:

Server Error in '/' Application.
--------------------------------------------------------------------------------


This newsgroup covers calssic ASP. Dotnet is a different technology.
You should try asking your question in
microsoft.public.dotnet.framework.aspnet
 
B

Bob Barrows [MVP]

Charlie said:
I have a real stumper. I added a server side table to a home page
that has two other server side tables on it that have been working
great. In Visual Studio everything works great. When I put the page
on the production server, the first time in the page works great. If
I navigate to any other page on the site and then try to return to
the home page the control I added throws the following:

Server Error in '/' Application.
-------------------------------------------------------------------------- ------
cp and followup set to microsoft.public.dotnet.framework.aspnet

Mike already advised you about the correct group for this question, so I'll
just chime in with:

It's very difficult to see what's wrong without seeing the code in question,
so make sure you post some of it to the aspnet group.

I do want to say that it's bad practice to allow detailed error messages
like this to be sent to the client in production applications. Hackers can
make use of the details presented to enable them to break into your
site/database. You should turn off detailed messages in your production
site's web.config file. I usually trap errors and log them in a file on the
server to enable troubleshooting of problems in production applications.

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,775
Messages
2,569,601
Members
45,183
Latest member
BettinaPol

Latest Threads

Top