Posted on: 9/26/2014 2:31:15 PM | Views : 454

Hi,
    In userName stored in session. After some time session value  has  been expired,
after reloading  the page, It shows...
Object reference not set to an instance of an object.   After deleting the cookies its working fine.

kindly help to solve this issue
string userName = Page.User.Identity.Name; string connectionString =ConfigurationUtility.GetConnectionString(); if (Page.User.Identity.IsAuthenticated) { if (!string.IsNullOrEmpty(Session["USER_NAME"].ToString())) { userName = Session["USER_NAME"].ToString(); // paneUser.Visible = true; DataTable personalDetails = CarOwnerInformationDataAccess.ListPersonalInfoCarOwnerDetails(userName, connectionString); if (perso ...

Go to the complete details ...