Security Token Service could not activated SecurityTokenServiceApplication/securitytoken.svc/actas’ could not be activated.

1. Type iisreset on command line. Recycle application pool that still keeping wrong information even if your application pool stop and re-start. So, the best solutions is resetting your IIS.