Aspnet_regiis -ga domain\user results in 'an attempt was made to reference a token that does not exist.'
Today I had to run aspnet_regiis -ga domain\user to grant a specific domain user account access to the IIS metabase and other directories that are used by IIS. The server in question is running Windows Server 2003 R2 x64 edition and after running aspnet_iisreg from the C:\Windows\Microsoft.NET\Framework\v2.0.50727 directory, I received an error that read:
'An error has occured: 0x000703f0 An attempt was made to reference a token that down not exist.'
After a quick look at the server, I noticed that the .NET 2.0 framework was actually the x64 version rather than the x86 (i.e. 32-bit) version that I had assumed. Running the aspnet_regiis command from the C:\Windows\Microsoft.NET\Framework64\v2.0.50727 directory, the command completed successfully.