If you get this error below then try this..
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.
Add this in web.config
<system.Web> ... <trust level="Full"/> ... </system.Web>
<system.codedom> <compilers> <!-- All is removed between these tags--> </compilers> </system.codedom>