嗨,我收到了这个错误
无法从命令行或调试器启动服务。必须首先安装 winwows 服务(使用 installutil.exe),然后使用 ServerExplorer、Windows Services Afministrative 工具或 NET START 命令启动。
我不明白为什么我会收到这个错误。这是我的代码:
{
string Hash = "";
string connectionstring = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
SqlConnection myConnection = new SqlConnection(connectionstring);
SqlCommand myCommand = new SqlCommand("GetNullHash", myConnection);
myCommand.CommandType = CommandType.StoredProcedure;
myConnection.Open();
SqlDataReader rdr = myCommand.ExecuteReader();
while (rdr.Read())
{
string filename = @"\\" + rdr.GetString(3);
filename = System.IO.Path.Combine(filename, rdr.GetString(2));
filename = System.IO.Path.Combine(filename, rdr.GetString(1));
Hash = rdr.GetString(0);
Hash = computeHash(filename);
}
myConnection.Close();
return Hash;
}