Posted on: 12/16/2015 9:00:23 PM | Views : 1206

I am tyring to over come a issue with using session by having a property to store the providerkey i seen examples of this but I am using form authentication so i dont no if i can use that

Guid _UserID; public Guid UserID { get { MembershipUser user = Membership.GetUser(HttpContext.Current.User.Identity.Name); Guid guid; Debug.Assert(user.ProviderUserKey != null, "user.ProviderUserKey != null"); guid = (Guid)user.ProviderUserKey; return guid; } set { this._UserID = value; }
The erorr I am getting is the following

An exception of type 'System.NullReferenceException' occurred in SkyLarkArenaCms.dll but was not handled in user code Additional information: Object reference not set to an instance of an object. I would reference the property via the master page so that all the child pages can use it so then in my child page i just do ...

Go to the complete details ...