不要完全相信它报的这个错误,我数据库地址错了它也这么乱报。
建议你加一个
try
{
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
看看到底是什么错误。