CryptProtectData failed when calling from ASP.NET

P

poifull

Hi Everyone,

When I call the CryptProtectData function from an ASPX page, I got the
following error:
The system cannot find the file specified

I'm getting the error only when ASP Impersonation is used by setting the
<IDENTITY> tag in web.config. Without impersonation the ASPX page works
fine.
The funny thing is if I use RUNAS to open a CMD window with the account
specified in <IDENTITY>, the ASPX page works!

The library is copied from the article "How to: Create a DPAPI Library"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT07.asp

Any help will be appreciated.
 
S

swat

Hi poifull,

What is the authentication in IIS set to? Anonymous? Windows
Integrated? Both? Other?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top