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 12:     Public Shared Function IsGZipSupported() As Boolean
Line 13:         Dim AcceptEncoding As String = HttpContext.Current.Request.Headers("Accept-Encoding")
Line 14:         If Not String.IsNullOrEmpty(AcceptEncoding) AndAlso AcceptEncoding.Contains("gzip") OrElse AcceptEncoding.Contains("deflate") Then
Line 15:             Return True
Line 16:         End If

Source File: C:\Inetpub\vhosts\drjasminekaur.com\httpdocs\MasterPage.master.vb    Line: 14

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   MasterPage.IsGZipSupported() in C:\Inetpub\vhosts\drjasminekaur.com\httpdocs\MasterPage.master.vb:14
   MasterPage.GZipEncodePage() in C:\Inetpub\vhosts\drjasminekaur.com\httpdocs\MasterPage.master.vb:22
   MasterPage.MasterPage_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\drjasminekaur.com\httpdocs\MasterPage.master.vb:8
   System.Web.UI.Control.OnLoad(EventArgs e) +105
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Control.LoadRecursive() +161
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3784


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