从 IIS 但不是从 IIS express 调用时,C

编程入门 行业动态 更新时间:2024-10-19 22:29:40
本文介绍了从 IIS 但不是从 IIS express 调用时,C_GetSlotList 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以我有这个 c# web 服务,它最终通过放置在 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 :)

更多推荐

从 IIS 但不是从 IIS express 调用时,C

本文发布于:2023-10-24 14:07:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524138.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:是从   但不   IIS   express

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!