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 91: 		else if (HttpContext.Current.Request.QueryString["l"]!=null) { UserCulture=CIfromShortCode(HttpContext.Current.Request.QueryString["l"]); }
Line 92: 		else if (HttpContext.Current.Session["lang"]!=null) { UserCulture=CIfromShortCode(HttpContext.Current.Session["lang"].ToString()); }
Line 93: 		else UserCulture=new CultureInfo(HttpContext.Current.Request.UserLanguages[0]);
Line 94: 
Line 95: 		UserCulture=CIfromShortCode(UserCulture.Name.Substring(0,2));

Source File: c:\HostingSpaces\106\hotel-duet.com\wwwroot\App_Code\CommonCode.cs    Line: 93

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   duetp.CommonCode.SetLanguage(String lc) in c:\HostingSpaces\106\hotel-duet.com\wwwroot\App_Code\CommonCode.cs:93
   duetp.CommonCode.SetLanguage() in c:\HostingSpaces\106\hotel-duet.com\wwwroot\App_Code\CommonCode.cs:86
   Restaurant.InitializeCulture() in c:\HostingSpaces\106\hotel-duet.com\wwwroot\restaurant.aspx.cs:5
   ASP.restaurant_aspx.__BuildControlTree(restaurant_aspx __ctrl) in c:\HostingSpaces\106\hotel-duet.com\wwwroot\restaurant.aspx:1
   ASP.restaurant_aspx.FrameworkInitialize() in c:\HostingSpaces\106\hotel-duet.com\wwwroot\restaurant.aspx.cs:912308
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +51
   System.Web.UI.Page.ProcessRequest() +78
   System.Web.UI.Page.ProcessRequest(HttpContext context) +73
   ASP.restaurant_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\35631585\97a05953\App_Web_k5nqgqio.6.cs:0
   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.4210.0