I have looked up a lot of references on this error but none have seem to answer my question.
The Line DateTime t1 = us.CreationDate; is throwing the error any Ideas. I can't figure out how this could be generating a null.
Basically it is just a simple app to promote users to new roles after a certain time span. But for some reason I can't get it to work.
protected void LoginButton_Click(object sender, EventArgs e)
{
MembershipUser us = Membership.GetUser();
DateTime t1 = us.CreationDate;
DateTime dt2 = DateTime.Now;
TimeSpan diff = dt2.Subtract(t1);
double totalh = diff.TotalDays;
Label1.Text = totalh.ToString();
if (totalh > 90 && totalh < 180 && Roles.IsUserInRole("Premier Martial Arts Licensing") == true)
{
Roles.AddU ...
Go to the complete details ...