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 302:            context.Response.Clear();
Line 303:            //context.Response.ContentType = "application/octet-stream";
Line 304:            context.Response.ContentType = Runtime.Core.Utility.GetMimeType(Mf.Extension, "application/octet-stream");
Line 305:            context.Response.AppendHeader("Content-Disposition", "filename=" + HttpUtility.UrlEncode(Mf.FileName));
Line 306:            context.Response.AppendHeader("Content-Length", Mf.Size.ToString());

Source File: c:\Websites\IIS\HomeModsNET\Download.ashx    Line: 304

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   FluxUtilityPack.Base.Utility.GetMimeType(String Extension, String DefaultValue) in e:\Projects\NFS\FluxUtilityPack\Base\Utility.cs:4130
   Download.TransmitDownload(HttpContext context, String TextID, Boolean IncrementHits, Mediums DisplayMedium, String RelatedContentType, Int32 RelatedContentID, String Tags) in c:\Websites\IIS\HomeModsNET\Download.ashx:304
   Download.ProcessRequest(HttpContext context) in c:\Websites\IIS\HomeModsNET\Download.ashx:229
   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