EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problem with web service

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
Posted: 07/16/2014 07:06:31
by Ismael Torralba (Basic support level)
Joined: 07/16/2014
Posts: 2


I've developed a Web Service that signs PDF files with a certificate in a USB token(Bit4ID).

If I'm working throught Visual Studio, it works fine. But, If I install the Web Service in IIS 7, it doesn't work. I use SecureBlackBox Library and PKCS11, like this:

List<PKCS11Slot> listaSlots = Pkcs11KS.GetAvailableSlots();
StringBuilder sb = new StringBuilder();
sb.Append(String.Format("Hay {0} SLOTS\r\n", listaSlots.Count));
foreach (PKCS11Slot slot in listaSlots)
sb.Append(String.Format("Slot: {0} - {1}\r\n", slot.Index, slot.Description));

Throught Visual Studio it returns some Slots available into the Token. With IIS it gives me 0 slots.

Anyone could help me please?

Posted: 07/16/2014 07:53:51
by Ken Ivanov (EldoS Corp.)

Hello Ismael,

Thank you for contacting us.

I suspect that the issue might be somehow related to the account the code is executed under. For example, the token driver might have only been installed for a particular user account (which you are using for development purposes), and not for the account under which the IIS web service is running.

Besides, the problem might have something to do with bitness. Does your Visual Studio project have the same bitness as the IIS process (32/64 bit)?

Posted: 07/18/2014 05:22:29
by Ismael Torralba (Basic support level)
Joined: 07/16/2014
Posts: 2


Thank you for your help.

I have SecureBlackBox version, is it 32 o 64 bits version ?
I've compiled all in 32 bit and now the web service is returning this:

<signDocByFileResponse xmlns="http://tempuri.org/">
<signDocByFileResult xmlns:a="http://schemas.datacontract.org/2004/07/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:errorMessage>Error: There are 3 SLOTS
Slot: 0 - Crypto Token Reader
Slot: 1 - Cherry GmbH SmartTerminal ST-2xxx 0
Slot: 2 - Cherry GmbH SmartTerminal ST-2xxx 0

Error closing session: PKCS#11 error CKR_USER_NOT_LOGGED_IN in function C_Logout</a:errorMessage>
<a:file i:nil="true"/>


So I'm not sure if it is a problem related with the 32 o 64 version... Any idea?

Thank you again,

Posted: 07/18/2014 05:36:41
by Eugene Mayevski (EldoS Corp.)

If you have a license, please link the license ticket to your user account before we continue. The ticket itself and the procedure of its use are specified in the registration e-mail that was sent to you upon license purchase. If you don't have the license ticket, please contact the person from which you have obtained the license key (the one in your source code) for a license ticket.

NOTE: please don't post license keys and license tickets to the forum. If you need to clarify something about your license, please use HelpDesk ( http://www.eldos.com/helpdesk/ ).

Sincerely yours
Eugene Mayevski



Topic viewed 462 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!