M
Mekkala
I have an ASP.NET application in which I store certain configuration
files on the server from my code. I have to put these files under the
web root, since I later access them in my application using a URL. The
problem is that whenever I try to write the file (or the folder
containing it) to disk, I get the following error:
Security Exception
Description: The application attempted to perform an operation not
allowed by the security policy. To grant this application the required
permission please contact your system administrator or change the
application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Exception from
HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED).
This has never happened before. It started happening immediately after
I changed the virtual directory to inherit security settings from the
parent folder -- and yet the virtual directory had the same security
settings as the parent folder *anyway*. Anyone know what could cause
this? And yes, before anyone asks, the ASPNET account has read, write,
execute, and list folder contents permissions on the root drive, the web
root, and the folder I'm trying to write to and read from.
Thanks in advance.
files on the server from my code. I have to put these files under the
web root, since I later access them in my application using a URL. The
problem is that whenever I try to write the file (or the folder
containing it) to disk, I get the following error:
Security Exception
Description: The application attempted to perform an operation not
allowed by the security policy. To grant this application the required
permission please contact your system administrator or change the
application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Exception from
HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED).
This has never happened before. It started happening immediately after
I changed the virtual directory to inherit security settings from the
parent folder -- and yet the virtual directory had the same security
settings as the parent folder *anyway*. Anyone know what could cause
this? And yes, before anyone asks, the ASPNET account has read, write,
execute, and list folder contents permissions on the root drive, the web
root, and the folder I'm trying to write to and read from.
Thanks in advance.