Got this error and found that I had not correctly copied the sql server, machineValidationKey, MachineDecryptionKey over into my new web.config.
Then I to start the install I ran localhost/DotNetNuke rather than just localhost/ which is the top most alias for the installation rather than the virtual directory entry. Entering the topmost level alias as a url that you had set in your host alias settings is rquired.
This was for upgrading Version 3.2.2 to 3.3.5