c# Exception one or more errors occured

General information about Neurotechnology and its software

c# Exception one or more errors occured

Postby longbowsolution » Jun 07, 2018 07:50

Im trying to do verify for two photos, but somehow it throw exception 'One or more errors occurred'.

may i know how can i fix this ?
error image : https://ibb.co/hBWdHo

NBiometricStatus status = biometricClient.Capture(subject);
if (status == NBiometricStatus.Ok)
bool match = crud.CheckMatch(subject);

public bool CheckMatch(NSubject _subject)
{

bool flag = false;
byte[] img = new byte[] { };

NSubject subject2 = null;
NFaceView faceView2 = new NFaceView();
var biometricClient = new NBiometricClient();
NFace face2 = new NFace();

try
{
string query = "select * from employee order by first_name desc ";
using (SqlCommand dbcmd = new SqlCommand(query, dbconn))
{
using (SqlDataReader dr = dbcmd.ExecuteReader())
{
while (dr.Read())
{
img = (byte[])(dr[2]);
if (img == null)
{

}
else
{
NImage image = NImage.FromMemory(img);
face2 = new NFace() { Image = image };
subject2 = new NSubject();
subject2.Faces.Add(face2);

var status3 = biometricClient.Verify(_subject, subject2); //throw exception
}
}

}
}
}
}
catch (Exception ex)
{
Console.WriteLine("debug===" + ex.Message);
}
return flag;
}

longbowsolution
 
Posts: 6
Joined: May 31, 2018 14:02

Re: c# Exception one or more errors occured

Postby Martynas » Jun 07, 2018 07:56

Hello,

You can check the inner exception for detailed exception description.
Also you can parse the exception by using the PrintException method available in SDK TutorialsUtils.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2210
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: c# Exception one or more errors occured

Postby longbowsolution » Jun 07, 2018 09:13

Martynas wrote:Hello,

You can check the inner exception for detailed exception description.
Also you can parse the exception by using the PrintException method available in SDK TutorialsUtils.



Hi Martynas,

can you please help check this.
https://ibb.co/kBsVho

the inner exception show "operation is not activated" ?
longbowsolution
 
Posts: 6
Joined: May 31, 2018 14:02

Re: c# Exception one or more errors occured

Postby Martynas » Jun 07, 2018 10:41

Hi,

this error means that you either do not have licenses, either do not obtain them in your code.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2210
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania


Return to Public

Who is online

Users browsing this forum: buy resumes online and 3 guests