In my case this code works when i have added this.ViewStateUserKey = Session.SessionID; in aspx OnInit event.