Discussion:
12157 - Failed to load secured libraries
(too old to reply)
Sam D
2004-05-12 21:01:04 UTC
Permalink
I am getting an odd error when I try to run an application on a Windows 2003 Small Business server. The application utilizes a client certificate to authenticate to a secured website via a port other than 443. It works fine in our office on Windows 2000 but not on the server 2003. We keep getting a 12157 error but nothing I can find on microsoft tells me why I would get that error.
Stephen Sulzer
2004-05-12 22:27:33 UTC
Permalink
Error 12157 is a (unhelpful) WinInet error code meaning that some problem
was encountered with the security/SSL subsystem. The first thing to do is to
check in the Event Viewer. Sometimes the security subsystem will log an
error message that describes what went wrong. There is probably something
wrong with the client certificate on your 2003 server. Perhaps the user
account under which your application runs on the 2003 server does not have
access permissions to use the client certificate, for example.
Post by Sam D
I am getting an odd error when I try to run an application on a Windows
2003 Small Business server. The application utilizes a client certificate to
authenticate to a secured website via a port other than 443. It works fine
in our office on Windows 2000 but not on the server 2003. We keep getting a
12157 error but nothing I can find on microsoft tells me why I would get
that error.
Sam D.
2004-05-12 22:56:03 UTC
Permalink
We are running it as administrator. The funny thing is that we can run it on our 2003 server just fine. We are using a client certificate to access the site. This is the code we are using

// Create internet connectio
m_hInternet = InternetOpen("CreditBureau",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);
// Parse UR
strURL = m_strURL
AfxParseURL((LPCTSTR)strURL,dwServType,strServer,strRequestPost,nPort)
// Create internet sessio
m_hSession = InternetConnect(m_hInternet,strServer,nPort,NULL,NULL,INTERNET_SERVICE_HTTP,0,0)

If that all goes well we do the following

m_hRequest = HttpOpenRequest(m_hSession,strVerb,strRequestPost,NULL,"",NULL,INTERNET_FLAG_RELOAD|INTERNET_FLAG_SECURE|INTERNET_FLAG_IGNORE_CERT_CN_INVALID,m_nReID)



----- Stephen Sulzer wrote: ----

Error 12157 is a (unhelpful) WinInet error code meaning that some proble
was encountered with the security/SSL subsystem. The first thing to do is t
check in the Event Viewer. Sometimes the security subsystem will log a
error message that describes what went wrong. There is probably somethin
wrong with the client certificate on your 2003 server. Perhaps the use
account under which your application runs on the 2003 server does not hav
access permissions to use the client certificate, for example
Post by Sam D
I am getting an odd error when I try to run an application on a Window
2003 Small Business server. The application utilizes a client certificate t
authenticate to a secured website via a port other than 443. It works fin
in our office on Windows 2000 but not on the server 2003. We keep getting
12157 error but nothing I can find on microsoft tells me why I would ge
that error
Sam D.
2004-05-12 23:36:05 UTC
Permalink
Found the problem. The issue was related to the client certificate. There is a setting in IE for the Internet Zone that says Don't prompt if no certificate is found or only one certificate is found. It was disabled and once I enabled it everything worked fine.
Continue reading on narkive:
Loading...