(imported topic written by SystemAdmin)
Hey all,
I have a problem with some code using the platform api. The BES_Signing_Keys works great when used on the machine I programmed the piece of code on, however, when I move my html application to another computer the function AreSigningKeysValid(usernametem, passwordtem) claims they are no longer valid. I am using a share to store the three files so the html application should work anywhere. The code is written in javascript.
var sk = new ActiveXObject(“BESAPI.SigningKeys”);//used to check the TEM credentials of the user
var usernametem = window.prompt("Enter your username for TEM: ", “”);//allows the user to enter their username
while (usernametem == “”) {
usernametem = window.prompt("Enter your username for TEM: ", “”);//makes sure they enter a username
}
sk.SetPrivateKeyPath(usernametem, “\\server\share\publisher.pvk”);
sk.SetPublisherCertPath(usernametem, “\\server\share\publisher.crt”);
sk.SetLicenseCertPath(usernametem, “\\server\share\license.crt”);
var passwordtem = window.prompt("Enter your password for TEM: ", “”);//sets the user’s password within TEM
alert(usernametem + “,” + passwordtem);
while (!sk.AreSigningKeysValid(usernametem, passwordtem)) {//as long as the signing keys are not valid
var msg = "Diagnostic Message: " + sk.DiagnosticMessage;//set up a diagnostic message to the user
if (msg != "Diagnostic Message: ") {//if the diagnostic message contains useful information
window.alert(msg);//send out the diagnostic message
}
usernametem = window.prompt("Enter your username for TEM: ", “”);//reprompt for a username
while (usernametem == “”) {//while the username is not entered
usernametem = window.prompt("Enter your username for TEM: ", “”);//reprompt for a username
}
passwordtem = window.prompt("Enter your password for TEM: ", “”);//reprompt for a password
sk.SetPrivateKeyPath(usernametem, “\\server\share\publisher.pvk”);
sk.SetPublisherCertPath(usernametem, “\\server\share\publisher.crt”);
sk.SetLicenseCertPath(usernametem, “\\server\share\license.crt”);
}
alert(“User: " + usernametem + " has successfully logged in”);//if the signing keys are correct send a success message
What happens on the computer I wrote the code on (using visual web developer if it matters) is I get to the alert at the bottom saying I was verified and everything was hunky-dory. However, when I go to another computer on the same network, and run the application, I get a diagnostic message saying that there was a "Database Error:
Microsoft
ODBC Driver Manager
Data source name not found and no default driver specified (IM002:0)"
I have made sure the odbc connection on the computer works through administrative tools -> data sources (ODBC) and that the driver is the same version on both machines (SQL Server Native Client 10.0). Can anyone help me out?
Thanks,
Ilithis