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 64:         Dim carImage As System.Drawing.Image
Line 65:         Dim d As Byte() = CType(command.ExecuteScalar, Byte())
Line 66:         memimage.Write(d, 0, d.Length)
Line 67:         Dim imageWidth As Integer = Width
Line 68:         Dim imageHeight As Integer = Height

Source File: C:\inetpub\wwwroot\www.billbruntonvw.com\Cars\Handler.ashx    Line: 66

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ImageFetch.writeSingleImage(Int32 CarID, Int32 View, Int32 Width, Int32 Height) in C:\inetpub\wwwroot\www.billbruntonvw.com\Cars\Handler.ashx:66
   ImageFetch.ProcessRequest(HttpContext context) in C:\inetpub\wwwroot\www.billbruntonvw.com\Cars\Handler.ashx:34
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +598
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +170


Version Information: Microsoft .NET Framework Version:2.0.50727.8806; ASP.NET Version:2.0.50727.8762