EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Certirficates List from ASP.NET

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#23037
Posted: 01/02/2013 20:50:42
by Jose Morales (Basic support level)
Joined: 01/02/2013
Posts: 7

Hi there, thanks for your help.
I'm trying to write a web application (asp.net). This application must sign PDF files with digital certificates from a smart card.

My application works fine as long I run it from VS2010, but when I deployed it to the Win2008 Srv the certificate list it's not loaded.

My question, there is any way I can load the certificates in the client machine? The certificates will be always in the client machine.

The code I'm using right now is this:

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{

SBUtils.Unit.SetLicenseKey("...");
SBPDF.Unit.Initialize();
SBPAdES.Unit.Initialize();
SBPDFSecurity.Unit.Initialize();
pkiHandler = new TElPDFAdvancedPublicKeySecurityHandler();
Session["PubKeySecurityHdl"] = m_Handler;

certStorage = new TElWinCertStorage();

//TElWinCertStorage.GetAvailableStores(certStorage.SystemStores, TSBStorageAccessType.atLocalMachine);

try
{
certStorage.SystemStores.BeginUpdate();
certStorage.SystemStores.Add("MY");
}
finally
{
certStorage.SystemStores.EndUpdate();
}


for (int i = 0; i <certStorage.Count; i++)
{
ListItem li = new ListItem( certStorage.get_Certificates(i).SubjectName.CommonName, certStorage.get_Certificates(i).SubjectRDN.SaveToDNString());
ddlCertList.Items.Add(li);
}
Session["CERT_STORE"] = certStorage;
}
}

This works fine as long I run it in VS2010, or in my machine IIS, but not from a Win2008 Server.

There is any way I can do this with SBB and ASP.NET?

Thanks
#23038
Posted: 01/03/2013 00:39:14
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

This article may help you: http://www.eldos.com/security/articles/7116.php
#23088
Posted: 01/09/2013 09:57:25
by Jose Morales (Basic support level)
Joined: 01/02/2013
Posts: 7

Thanks a lot!!

Reply

Statistics

Topic viewed 489 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!