The device is not ready when copying a file from one server to another

nxnvn

New Member
What am I doing wrong here?
XasC9.png">I have checked the variables and they are what they are supposed to be so no issues there.Am I missing something here
Code -\[code\]if (ddlPublisherServer.Text != ddlSubscriberServer.Text){ try { if (File.Exists("\\\\" + ddlSubscriberServer.Text + "\\SQLServerBackups\\" + txtSubscriberDatabaseName.Text + ".bak")) { File.Delete("\\\\" + ddlSubscriberServer.Text + "\\SQLServerBackups\\" + txtSubscriberDatabaseName.Text + ".bak"); } File.Copy(@"D:\SQLServerBackups\" + txtSubscriberDatabaseName.Text, "\\\\" + ddlSubscriberServer.Text + "\\SQLServerBackups\\" + txtSubscriberDatabaseName.Text + ".bak"); } catch (Exception ex) { ClientScript.RegisterStartupScript(GetType(), "Error!", "alert('" + ex.Message + "');", true); Logger.LogError(ex.Source, ex.TargetSite.ToString(), ex.Message); return; } }\[/code\]
 
Back
Top