|RESTORE failed for Server|
Restore failed for Server 'SERVERNAME'. (Microsoft.SqlServer.SmoExtended) ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: RESTORE cannot process database 'YourDataBaseName' because it is in use by this session. It is recommended that the master database be used when performing this operation. (Microsoft.SqlServer.Smo)
The mystery in our case was the fact that for some reasons unknown, the default database was changed from master to the Dynamics AX transaction database. Now when ever you try to restore on a database that is the default database of the active user, this message would appear.
Make sure the database you are restoring is not your user's default database :)