登录失败。该登录名来自不受信任的域,不能与 Windows 身份验证一起使用。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.SqlClient.SqlException: 登录失败。该登录名来自不受信任的域,不能与 Windows 身份验证一起使用。
源错误:
行 23: SqlConnection conn = new SqlConnection("server=qds175732161.my3w.com;database=qds175732161_db;Integrated Security=true;");
行 24: //SqlConnection conn = new SqlConnection("server=JS-PC;database=注册;Integrated Security=true;");
行 25: conn.Open();
行 26: SqlCommand cmd = new SqlCommand("select username from [users] where username=@username", conn);
行 27: cmd.Parameters.Add("@username", SqlDbType.NVarChar, 50);
源文件: c:\Users\JS\Desktop\连接到远程服务器\连接到远程服务器注册界面.aspx.cs 行: 25