I am using Safenet Sentinel key, I have created a webservice for login but when i run it the first time it throws an error HASPDotNetDllBroken but runs fine if i run it the second time or consecutively after that. I am using the following dlls:
and my webservice is:
[WebMethod]
public string Log()
{
HaspFeature feature = HaspFeature.Default;
string vendorCode="Az........";
Hasp hasp = new Hasp(feature);
HaspStatus status = hasp.Login(vendorCode);
if (HaspStatus.StatusOk != status)
{
return("Login Failed with status "+status.ToString());
}
else
{
return ("Login Successful with status "+status.ToString());
}
}
From the dll's you mention it seems your webservice is 32-bit. In that case you have to put the apidsp_windows.dll and the hasp_windows_.dll in the System32 directory on 32-bit machines and in the SysWOW64 directory on 64-bit machines. is your numeric vendorid, or demo if you're running in evaluation mode.
I hope that helps.