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 39: 			context.Response.Write("Nothing here")
Line 40: 		End If
Line 41: 		Select Case d.filename.Substring(d.filename.LastIndexOf(".")).ToLower
Line 42: 			Case ".png"
Line 43: 				context.Response.ContentType = "image/png"

Source File: E:\IISROOT\MuellerCatalog\viewdocument.ashx    Line: 41

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   viewimage.ViewDocument(HttpContext& context) in E:\IISROOT\MuellerCatalog\viewdocument.ashx:41
   viewimage.ProcessRequest(HttpContext context) in E:\IISROOT\MuellerCatalog\viewdocument.ashx:17
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +541
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +74
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0