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 24:         byte result = 0;
Line 25:         object obj = null;
Line 26:         if (obj == null) obj = HttpContext.Current.Profile.GetPropertyValue("LangId");
Line 27:         if (GetDefautInteger(obj,0) == 0)
Line 28:             result = Constants.LangId1;//mac dinh la ngon ngu dau tien

Source File: c:\Sites\matthan.online\App_Code\Utils.cs    Line: 26

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Utils.getLang() in c:\Sites\matthan.online\App_Code\Utils.cs:26
   BasePage.InitializeCulture() in c:\Sites\matthan.online\App_Code\BasePage.cs:8
   ASP.new_details_aspx.__BuildControlTree(new_details_aspx __ctrl) in c:\Sites\matthan.online\new_details.aspx:1
   ASP.new_details_aspx.FrameworkInitialize() in c:\Sites\matthan.online\new_details.aspx.cs:912308
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +67
   System.Web.UI.Page.ProcessRequest() +118
   System.Web.UI.Page.ProcessRequest(HttpContext context) +98
   ASP.new_details_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\70844c11\22c1f450\App_Web_ug2zd5vo.4.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +912
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164


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