locked
After Application Hosted on IIS 7 RRS feed

  • Question

  • User-1991150552 posted

    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).  Please give me a solution.

    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 <!-- [NullReferenceException]: Object reference not set to an instance of an object. at TimeSheet.UserControls.HeaderHome.Page_Load(Object sender, EventArgs e) in c:\Timesheet\UserControls\HeaderHome.ascx.cs:line 62 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.tseu_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\c8622a6f\85cb2d23\App_Web_pxuyivvb.12.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->

     

    Thursday, August 22, 2013 11:22 AM

Answers