This can happen if you are logged in (with a valid cookie) but have started with a clean database. You will have to log out and log back in to get the identity created successfully.
As for the SMO assembly, we don’t use the directly. Could this be another module that is failing to import?