Here is my situation: I have a folder as a sub of the site root called MyApp, which is an application folder in IIS. This is the entry point URL of my application. I also have a folder of the site root called Images, so the layout is: Site root-------Myapp| |---ImagesI get an access error when i try to save an image from within my application to the Images folder. Can the be done, or do I have to change my folder structure? Thanks in advance for any pointers.
Here is the full 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: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. I deployed as a website using ftp in VS. Btw, i havent ruled out a possible coding error, although it does work with on local server with this structure.
This is a trust level error. Try setting your applications trust level to either high or full. http://support.Winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx
Thx Ray, I explicitly set the trust level to "High" in the config file and it worked perfectly. I HAD considered that as an issue before posting but MS states here that the default is "Full", so i dismissed it too quickly Thanks again for the quick resolution