I'm no expert in this field but I'm fairly certain that the problem is that you're using SQL-Express together with the Connectionstring-Option "AttachDBFileName".
Please have a look at these sites for further information:
attachdbfilename-option-in-connection-string[
^]
sql-server-backuprestore[
^]
how-to-backup-and-restore-sql-express-2005-attachdbfilename-mode[
^]
connecting-to-sql-express-user-instances-in-management-studio.aspx[
^]
From the third linked site I "extracted" this as a possible solution:
1) For the restore, remove the "AttachDBFileName"-Part from the Connectionstring.
2) Use this for the restore command:
string destinationDb = "<path>\\Database1.mdf";
string backupDb = "<path>\\DBNameBackup.bak";
string query = "USE [master]; RESTORE DATABASE [" + destinationDb + "] FROM DISK = N'" + backupDb + "' WITH REPLACE;";
If this is the solution for your problem, please mark this as accepted :-)
If not, please tell and I will try to dig deeper into it.