Thursday, May 21, 2009

Azure - Simple Applicaiton - Security Exception Error

I have recently deploy Azure Application to see how Microsoft Cloud Application will work. In this process I come across Security Exception Error which took me while to figure out. So, if you have same issue make sure you do the following:

Here is the error message:

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: That assembly does not allow partially trusted callers.

1. In your "could" project make sure you open ".csdef" file and edit the following
WebRole name="WebRole" enableNativeCodeExecution="true">

Make sure you have enableNativeCodeExecution="true"

2. You should also make your "web_role" project open web.config file and make sure you have the following:


3. If you page still gives error message then you set all your <@Page Debug = "true"

4. Make sure you have customErrors mode="Off" in web.config file


This should make your application work on Azure Cloud Please don't forget to visit my website at: http://www.lookfordeal.com

No comments:

Post a Comment