Reputation: 76
I'm new to Encrypting File System (EFS). I have an ASP.NET web application hosted on Windows Server 2008. The web application saves some files in a local folder on server. When I applied the EFS (Encrypt contents to secure data) attribute to the folder while using an administrator login, the files inside got encrypted and are not accessible to other users. But, now the web application also cant access the files. The web application is set up with forms based authentication. How can I permit the web application to access the files?
Upvotes: 0
Views: 835
Reputation: 4623
EFS is designed to really only allow the user that encrypted the data to see it. Since you encrypted the value as the administrator user the user your application is running as (NETWORK SERVICE or whatever you've configured) doesn't have access. You need to give them decrypt rights on the folder. Forms authentication has no bearing on this, as it doesn't interact with the Windows-level security.
You can specify the user by going through the Details section of the folder properties window and then specifying the web app user. You may have to enable loading user profile for the application pool though.
But with all that being said, I don't actually know if EFS will let IIS decrypt the data. Googling around hasn't proven successful.
Upvotes: 1