我一直在为本地运行的SecuSearch SDK pro创建网络服务 但它的引擎无法在IIS上初始化。它正在读取放在C:\ ...上的许可证文件。 为了检查目的,我已经阅读了.dat lisence文件,其读数也正确。
[WebMethod] public void init() { Int32 iError = 0; SS_EngineParam pEngineParam; pEngineParam = new SS_EngineParam(); pEngineParam.CandidateNumber = m_NumCandList; pEngineParam.MemPoolSizeMB = SIZE_MEMORY_POOL; //pEngineParam.szLicenseFile = SECUSEARCH_LICENSE_FILE;
string text = System.IO.File.ReadAllText(@"C:\\Program Files (x86)\\SecuGen\\SecuSearch SDK Pro\\License\\temp_license.dat");
// Display the file contents to the console. Variable text is a string.
System.Console.WriteLine("Contents of WriteText.txt = {0}", text);
if (IsWow64())
pEngineParam.szLicenseFile = SECUSEARCH_LICENSE_FILE_x64;
else
pEngineParam.szLicenseFile = SECUSEARCH_LICENSE_FILE;
// Initialize SecuSearch Engine.
m_SecuSearch = new SecuSearch();
iError = m_SecuSearch.InitializeEngine(pEngineParam);// here it returns an error 2006
if (iError == (Int32)SS_Error.ERROR_NONE)
{
OracleConnection con = new OracleConnection();
string oradb = "Data Source=localhost;Persist Security Info=True;User ID=.....;Password=.....";
con.ConnectionString = oradb;
con.Open();
String strCommmand = "SELECT user_id, finger_no, sample_no, template_b64encoded FROM ForFDxSample";
OracleCommand cmd = new OracleCommand(strCommmand, con);
cmd.CommandType = CommandType.Text;
string x;
OracleDataReader objDataReader = null;
try
{
objDataReader = cmd.ExecuteReader();
if (objDataReader.HasRows)
{
while (objDataReader.Read())
{
SS_IDInfo idInfo;
idInfo = new SS_IDInfo();
idInfo.ID = Convert.ToInt32(objDataReader[0]);
// idInfo.FingerNumber = Convert.ToByte(objDataReader[1]);
idInfo.SampleNumber = Convert.ToByte(objDataReader[2]);
String template = objDataReader[3].ToString();
Byte[] minData;
minData = Convert.FromBase64String(template);
iError = m_SecuSearch.RegisterFP(minData, idInfo);
}
}
}
catch (OracleException err)
{
String Text = err.ToString();
}
objDataReader.Close();
cmd.Dispose();
con.Close();
}
}
这是初始代码。
iError = m_SecuSearch.InitializeEngine(pEngineParam); //此处返回错误2006
我正在使用MVC2
答案 0 :(得分:0)
解决。