Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

cryptography - C_GetSlotList Failing when called from IIS but not from IIS express

So I have this c# webservice that eventuallly calls C_GetSlotList() method from the German Elster toolkit (Eric) thru some smartcard usb driver placed in system32 folder. I have a smartcard in the computer server. When I host my service in IIS Express everything works fine, however in IIS it doesn't. What could be the problem? Does something block IIS from accessing the driver? I made sure that the identity of the application pool I'm using has admin rights. I'm using Windows 7 professional and this is the kind of log I am getting:

2016-10-18 15:16:58,144560  INFO: esigner       cryptokiVersion = 02.14
2016-10-18 15:16:58,144560  INFO: esigner        manufacturerID = A.E.T. Europe B.V.              
2016-10-18 15:17:01,244870 ERROR: esigner       error calling C_GetSlotList()
2016-10-18 15:17:01,244870 ERROR: esigner                    rv = 00000006
2016-10-18 15:17:01,244870 ERROR: esigner           ulSlotCount = 0
2016-10-18 15:17:01,244870 ERROR: esigner       pkcs11_init() failed
2016-10-18 15:17:01,245870  INFO: esigner  ENGINE_set_default_RSA(0436CC30) = returned 0
2016-10-18 15:17:01,245870  INFO: esigner       esiclGetToken() = end critical section
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Changing IIS application pool identity to LocalService usually helps. Don't ask me why :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...