CryptProtectData failed when calling from ASP.NET

From: poifull (poifull76_at_yahoo.com)
Date: 04/27/05


Date: Wed, 27 Apr 2005 05:45:09 GMT

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.



Relevant Pages

  • CryptProtectData failed when calling from ASP.NET
    ... When I call the CryptProtectData function from an ASPX page, ... I'm getting the error only when ASP Impersonation is used by setting the ... The funny thing is if I use RUNAS to open a CMD window with the account ...
    (microsoft.public.platformsdk.security)
  • ASPX - Anonymous Access in IIS 6
    ... What are the account requirements for aspx pages to be accessed ... When I view my aspx page in a browser locally or remotely I always get ... Administrators - Full Control ... Internet Guest Account - Read & Execute, List, Read ...
    (microsoft.public.inetserver.asp.general)
  • How to enable Anonymous Access in IIS 6
    ... What are the account requirements for aspx pages to be accessed ... When I view my aspx page in a browser locally or remotely I always get ... Administrators - Full Control ... Internet Guest Account - Read & Execute, List, Read ...
    (microsoft.public.inetserver.iis)
  • Re: ASPX - Anonymous Access in IIS 6
    ... For traditional ASP you might get that behavior if the anonymous account did ... not have the rights required to execute the ASP dlls (in the ... involved for ASPX. ...
    (microsoft.public.inetserver.asp.general)
  • Re: .net user not working IIS6
    ... when a user wants to run .aspx pages etc I ... > Also as a side option id like to have the ASPNET user on my domain so that I ... The ASPNET user is a local account, and cannot - unfortunately - be ... "replaced" by a domain account, ...
    (microsoft.public.inetserver.iis.security)