C_GetSlotList 从 IIS 调用但不是从 IIS express 调用时失败 [英] C_GetSlotList Failing when called from IIS but not from IIS express

查看:27
本文介绍了C_GetSlotList 从 IIS 调用但不是从 IIS express 调用时失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有这个 c# webservice,它最终通过放置在 system32 文件夹中的一些智能卡 USB 驱动程序调用来自德国 Elster 工具包 (Eric) 的 C_GetSlotList() 方法.我在计算机服务器中有一张智能卡.当我在 IIS Express 中托管我的服务时,一切正常,但在 IIS 中却没有.可能是什么问题呢?是否会阻止 IIS 访问驱动程序?我确保我使用的应用程序池的身份具有管理员权限.我使用的是 Windows 7 专业版,这是我得到的日志类型:

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

推荐答案

将 IIS 应用程序池标识更改为 LocalService 通常会有所帮助.不要问我为什么:)

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

这篇关于C_GetSlotList 从 IIS 调用但不是从 IIS express 调用时失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆