• Question

  • User-1392482182 posted

    In my Current pplication i am using the UIPab(User interface process application block) i have the follwing error

    System.NullReferenceException: Object reference not set to an instance of an object.

     Line 113:        //private SessionMoniker GetSessionMoniker()
    Line 114:        //{
    Line 115:        //    SessionMoniker sessionMoniker = SessionMoniker.GetFromSession( new Guid( Session[CurrentTaskKey].ToString() ) );
    Line 116:        //    return sessionMoniker;
    Line 117:        //}

    please Help me in this regard

    and if somebody can give some link or vedio training link regarding to UIPab (in which the usege of uipab)is from the start and step by step then this will be very helpfull for me beside of (msdn) side.

    Becuse i am new in asp.net application development:



    Mohammad Yaseen

    Trainee Softwre Engineer

    Thursday, January 4, 2007 8:09 AM

All replies

  • User485257357 posted
    It seems like Session[CurrentTaskKey] is null and when you try to convert it to a string it fails. Sessions is a way to maintain state on the web. The problems with sessions is that they might expire (default setting is 20 minutes of iddle time or when the app is restarted). Therefore you should check to make sure Session[CurrentTaskKey] != null before using it.
    Thursday, January 4, 2007 12:12 PM