Even with a valid license key, when I tried to open any of my SharePoint site, “The trial period for this product has expired” error popped up.
Digging more in to it, I found my Central Administration site’s application pool was running under Network Service account instead of the farm administrator account. And for some reason Network Service did not have the rights to license the product. I just changed the application pool identity of my site to the Farm administrator account. You can do this either through the Service Accounts section of Central Admin or through the IIS. Don’t forget to reset IIS after making the change. Aah!! My site worked like a charm 🙂