Object reference not set to an instance of an object.

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:


Line 16:     {
Line 17:         // Create a CAPTCHA image using the text stored in the Session object.
Line 18:         CaptchaImage ci = new CaptchaImage(this.Session["CaptchaImageText"].ToString(), 200, 50, "Century Schoolbook");
Line 19: 
Line 20:         // Change the response headers to output a JPEG image.

Source File: c:\Sites\IIS3\YMCA Victoria Avenue\www\CMSTemplates\YMCAVictoriaAveAspx\JpegImage.aspx.cs    Line: 18

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   JpegImage.Page_Load(Object sender, EventArgs e) in c:\Sites\IIS3\YMCA Victoria Avenue\www\CMSTemplates\YMCAVictoriaAveAspx\JpegImage.aspx.cs:18
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +41
   System.Web.UI.Control.OnLoad(EventArgs e) +131
   System.Web.UI.Control.LoadRecursive() +65
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975