views:

15

answers:

1

I've got a classlibrary which defines a couple of helper classes/methods which are used from a classic asp web application. So far, everything works fine. Now I've added a new helper method which signs a PDF file using a third party tool. Using a console application to call this wrapper method, everything works fine. Once I use an asp page to call the exact same method, the call to

X509Certificate2 cert = new X509Certificate2(sigFilePath, sigPassword);

fails with the error "The system cannot find the specified file" (translated from german).

Since the same code works fine called from the console application, i guess the problem must be located somewhere different. Could it be a security issue?

A: 

When I wonder if I'm facing a security issue like you do, I just do a quick test : I put the user account the webserver is using in the administrators group, do a quick iisreset, and try again. If it's working know you now it's a security issue. If it's still failing, look somewhere else.

Never forget to then remove the user accoung from the administrators group, and only do that on you own dev machine, not on production servers !!

If it's a security issue, I would then recommend launching Process Monitor (look for procmon in google). It's a Microsoft download. Look for access denied in the result column. You'll then know what's blocking you ...

Sébastien Nussbaumer

related questions