title: I have the same sql server version, try to restore db, got error: Specified cast is not valid. (SqlManagerUI)
body: <p>I have a customer which send me he's database. I have unzip it and try to restore it to my sql database. He is using SQL Server 2008 R2 and me to. I try the following steps:</p>
  
  <ol>
  <li>open SQL Server Management Studio</li>
  <li>login</li>
  <li>right click on the databases folder</li>
  <li>click on "Restore Database..."</li>
  <li>I give the database a new name because I don't have it yet</li>
  <li>I select the radio button "From device"</li>
  <li>I browse and select the <code>.bak</code> file</li>
  <li>I click on the OK button to start the restore</li>
  </ol>
  
  <p>Now I got this error below. I don't understand what the problem is!</p>
  
  <blockquote>
    <p>Specified cast is not valid. (SqlManagerUI)</p>
    
    <p>Program Location:</p>
    
    <p>at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.PopulateGridWithBackupSetsFromDevices()<br>
    at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.GetBackupSetsFromDevices()<br>
    at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.textDeviceSelected_TextChanged(Object sender, EventArgs e)<br>
    at System.Windows.Forms.Control.OnTextChanged(EventArgs e)<br>
    at System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)<br>
    at System.Windows.Forms.Control.set_Text(String value)<br>
    at System.Windows.Forms.TextBoxBase.set_Text(String value)<br>
    at System.Windows.Forms.TextBox.set_Text(String value)<br>
    at Microsoft.SqlServer.Management.SqlManagerUI.SqlRestoreDatabaseGeneral.buttonSelectDevice_Click(Object sender, EventArgs e)<br>
    at System.Windows.Forms.Control.OnClick(EventArgs e)<br>
    at System.Windows.Forms.Button.OnClick(EventArgs e)<br>
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)<br>
    at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)<br>
    at System.Windows.Forms.Control.WndProc(Message&amp; m)<br>
    at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)<br>
    at System.Windows.Forms.Button.WndProc(Message&amp; m)<br>
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)<br>
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)<br>
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)  </p>
  </blockquote>