Hi,
My application is on .net framework 2.0
Application was executing properly when I run the application.
I am facing the below error after I have hosted my application on the IIS 7(Windows 7 OS).
I have tried in google but couldnot find the solution. Please help me in solving a problem
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 60: Timesheet_BAL.User objSheet = new Timesheet_BAL.User();
Line 61:
Line 62: lblwelcome.Text = "Welcome " + ((Timesheet_BAL.User)Session["currentuser"]).Empname.ToString(); Line 63: //lblwelcome.Text = "Welcome " + objSheet.Empname.ToString();
Line 64:
Source File: c:\Timesheet\UserControls\HeaderHome.ascx.cs Line: 62
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
TimeSheet.UserControls.HeaderHome.Page_Load(Object sender, EventArgs e) in c:\Timesheet\UserControls\HeaderHome.ascx.cs:62
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Version Information: Microsoft .NET Framework Version:2.0.50727.4984; ASP.NET Version:2.0.50727.4971