System.InvalidCastException: 将参数值从 String 转换到 Byte[] 失败。 ---> System.InvalidCastException: 从“System.String”到“System.Byte[]”的强制转换无效。 在 System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider) 在 System.String.System.IConvertible.ToType(Type type, IFormatProvider provider) 在 System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) 在 System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) --- 内部异常堆栈跟踪的结尾 --- 在 System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) 在 System.Data.SqlClient.SqlParameter.GetCoercedValue() 在 System.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc) 在 System.Data.SqlClient.SqlCommand.BuildParamList(TdsParser parser, SqlParameterCollection parameters) 在 System.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc) 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) 在 BBSSQLDB2.DBFactory.ExecNonQuery(String strSql, SqlParameter[] sqlPara) 位置 D:\BBS\BBS\BBSSQL\DBFactory.cs:行号 113 在 BBSSQL.DAO.USERDAO.AddUSER(USEREntity userEntity) 位置 D:\BBS\BBS\BBSSQL\DAO\USERDAO.cs:行号 233 在 BBSWeb.Register.UserRegister(String username, String userpwd, String userpwd2, String usercall) 位置 D:\BBS\BBS\BBSWeb\Register.aspx.cs:行号 91 在 BBSWeb.Register.btnOK_Click(Object sender, EventArgs e) 位置 D:\BBS\BBS\BBSWeb\Register.aspx.cs:行号 33 System.InvalidCastException: 将参数值从&nb