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 75:         public static string UnlockcommTemplate()
Line 76:         {
Line 77:             return clsEncrypt.Decrypt(HttpContext.Current.Request.Cookies["UnlockcommTemplate"]["TemplateNm"]);
Line 78:         }
Line 79:     }

Source File: e:\UNLOCK\Sites\inetpub3\merafavourite.com\App_Code\Entity\Entity.cs    Line: 77

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Entities.sitecpCookies.UnlockcommTemplate() in e:\UNLOCK\Sites\inetpub3\merafavourite.com\App_Code\Entity\Entity.cs:77
   Checkout..ctor() in e:\UNLOCK\Sites\inetpub3\merafavourite.com\Checkout.aspx.cs:12
   ASP.checkout_aspx..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\269030d0\407c52ba\App_Web_lvlqetpb.26.cs:0
   __ASP.FastObjectFactory_app_web_lvlqetpb.Create_ASP_checkout_aspx() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\269030d0\407c52ba\App_Web_lvlqetpb.32.cs:0
   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +31
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +104
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
   System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +66
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +196
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +163
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163


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