stateSaver["username"].ToString() ;
connectionstring += ";Password=" +
stateSaver["password"].ToString() ;
}
else{
// Here you need to test the connection...
// and proceed.
SqlConnection conn =
new SqlConnection( "Data Source=" +
stateSaver["server"].ToString()+
";Initial Catalog=master;trusted_connection=yes");
conn.Open();
conn.Close();
conn.Dispose();
TrustedConnection=true;
stateSaver.Add("trustedconnection",true);
connectionstring+=";Trusted_connection=yes";}
// Set the Config file’s connection string
XmlDocument doc = new XmlDocument();
doc.Load(stateSaver["target"].ToString()+
@"bin\Customer.exe.config");
XmlNode connectionNode =
doc.SelectSingleNode(
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/