Dave Burke : Freelance .NET Web Developer specializing in Online Communities

Object reference instance error and the web.config

Problem

Your app is looking for an appsetting value in the web.config and when it isn't found generates the error 

Object reference not set to an instance of an object.

Resolution

Add the friggen' appsetting value

Analysis

Wooo-wee!  This is a humdinger of a tough bug to track down.  Usually you'll have pretty clear information in the stack to pinpoint the missing object, or it may be something as obvious as a Label webcontrol missing in the .ASPX.  But there's very little to go on when its a missing appsetting value.  This error generally appears when testing a new app on a production server after updating the /bin/dlls, which is a bad thing.  This also makes diagnosis more difficult, so a documented procedure to update the server web.config prior to updating the dlls is a good thing.

For more information

See comments.

Comments (0) | Post RSS RSS comment feed

Posted on 4/27/2004 9:44:00 AM by Dave Burke
Categories:
Tags:

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke